Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Oct 2, 2024
1 parent 4b33f09 commit 1ca6a39
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 12 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ psalm:
.PHONY: phpunit
phpunit:
$(eval c ?=)
rm -rf tests/var
vendor/bin/phpunit $(c)

.PHONY: composer-dump
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"psr/http-factory-implementation": "^1.0",
"psr/http-message": "^1.0 || ^2.0",
"rekalogika/direct-property-access": "^1.1.2 || ^1.2",
"rekalogika/doctrine-collections-decorator": "^2.0",
"rekalogika/doctrine-collections-decorator": "^2.3",
"rekalogika/reconstitutor": "^1.3.2 || ^1.4",
"rekalogika/temporary-url-bundle": "^1.3",
"symfony/config": "^6.2 || ^7.0",
Expand Down
14 changes: 7 additions & 7 deletions tests/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ doctrine:
auto_mapping: false
enable_lazy_ghost_objects: true
report_fields_where_declared: true
# mappings:
# App:
# is_bundle: false
# type: attribute
# dir: "%kernel.project_dir%/src/Fixtures/Doctrine"
# prefix: 'Rekalogika\File\Tests\Fixtures\Doctrine'
# alias: App
mappings:
App:
is_bundle: false
type: attribute
dir: "%kernel.project_dir%/src/Entity"
prefix: 'Rekalogika\File\Tests\Entity'
alias: App
51 changes: 51 additions & 0 deletions tests/src/Entity/User.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

declare(strict_types=1);

/*
* This file is part of rekalogika/file-src package.
*
* (c) Priyadi Iman Nurcahyo <https://rekalogika.dev>
*
* For the full copyright and license information, please view the LICENSE file
* that was distributed with this source code.
*/

namespace Rekalogika\File\Tests\Entity;

use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
class User
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private ?int $id = null;

#[ORM\Column(type: 'string', length: 255)]
private string $name;

#[ORM\Column(type: 'string', length: 255)]
private string $email;

public function __construct(string $name, string $email)
{
$this->name = $name;
$this->email = $email;
}

public function getId(): ?int
{
return $this->id;
}

public function getName(): string
{
return $this->name;
}

public function getEmail(): string
{
return $this->email;
}

}
4 changes: 0 additions & 4 deletions tests/src/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ public function __construct(
#[\Override]
public function boot(): void
{
$filesystem = new Filesystem();
$filesystem->remove(__DIR__ . '/../var/');

parent::boot();

}

#[\Override]
Expand Down

0 comments on commit 1ca6a39

Please sign in to comment.