Skip to content

Commit

Permalink
Fixes unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Jan 8, 2024
1 parent b933c0c commit f0b36a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"spiral/tokenizer": "^3.0",
"spiral/config": "^3.0",
"spiral/validator": "^1.2",
"spiral/filters": "^3.9",
"spiral/filters": "^3.10",
"spiral/data-grid-bridge": "^3.0",
"psr/container": "^1.1 || ^2.0"
},
"require-dev": {
"doctrine/collections": "^1.6",
"doctrine/collections": "^2.0",
"illuminate/collections": "^9.0",
"infection/infection": "^0.26.6",
"mockery/mockery": "^1.5",
Expand Down
5 changes: 4 additions & 1 deletion tests/app/Entities/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
use Cycle\Annotated\Annotation\Entity;
use Spiral\App\Repositories\RoleRepository;

#[Entity(repository: RoleRepository::class)]
#[
Entity(repository: RoleRepository::class),
\AllowDynamicProperties
]
class Role
{
#[Column(type: 'primary')]
Expand Down
7 changes: 5 additions & 2 deletions tests/app/Entities/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
use Doctrine\Common\Collections\ArrayCollection;
use Spiral\App\Repositories\UserRepository;

#[Entity(repository: UserRepository::class)]
#[
Entity(repository: UserRepository::class),
\AllowDynamicProperties
]
class User
{
#[Column(type: 'primary')]
Expand Down Expand Up @@ -46,7 +49,7 @@ class User

public function __construct(
#[Column(type: 'string')]
private string $name
private string $name,
) {
$this->friendsAsDoctrineCollection = new ArrayCollection();
$this->roles = new ArrayCollection();
Expand Down

0 comments on commit f0b36a7

Please sign in to comment.