Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Admin/src/Entity/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#[ORM\Entity(repositoryClass: AdminRepository::class)]
#[ORM\Table(name: "admin")]
#[ORM\HasLifecycleCallbacks]
#[ORM\Cache(usage: "NONSTRICT_READ_WRITE")]
class Admin extends AbstractEntity implements AdminInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/Admin/src/Entity/AdminLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#[ORM\Entity(repositoryClass: AdminLoginRepository::class)]
#[ORM\Table(name: 'admin_login')]
#[ORM\HasLifecycleCallbacks]
#[ORM\Cache(usage: "NONSTRICT_READ_WRITE")]
class AdminLogin extends AbstractEntity
{
Expand Down
1 change: 0 additions & 1 deletion src/Admin/src/Entity/AdminRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#[ORM\Entity(repositoryClass: AdminRoleRepository::class)]
#[ORM\Table(name: 'admin_role')]
#[ORM\HasLifecycleCallbacks]
#[ORM\Cache(usage: "NONSTRICT_READ_WRITE")]
class AdminRole extends AbstractEntity
{
Expand Down
10 changes: 3 additions & 7 deletions test/Unit/Admin/Entity/AdminLoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use DateTimeInterface;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\Table;
use Frontend\Admin\Entity\AdminLogin;
use Frontend\Admin\Repository\AdminLoginRepository;
Expand All @@ -19,17 +18,14 @@ class AdminLoginTest extends UnitTest
{
public function testAnnotations(): void
{
$reflection = new ReflectionClass(AdminLogin::class);
$entity = $reflection->getAttributes(Entity::class);
$table = $reflection->getAttributes(Table::class);
$hasLifecycleCallbacks = $reflection->getAttributes(HasLifecycleCallbacks::class);
$reflection = new ReflectionClass(AdminLogin::class);
$entity = $reflection->getAttributes(Entity::class);
$table = $reflection->getAttributes(Table::class);

$this->assertNotEmpty($entity[0]);
$this->assertNotEmpty($table[0]);
$this->assertNotEmpty($hasLifecycleCallbacks[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $entity[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $table[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $hasLifecycleCallbacks[0]);

$entityArguments = $entity[0]->getArguments();
$tableArguments = $table[0]->getArguments();
Expand Down
10 changes: 3 additions & 7 deletions test/Unit/Admin/Entity/AdminRoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use DateTimeInterface;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\Table;
use Frontend\Admin\Entity\AdminRole;
use Frontend\Admin\Repository\AdminRoleRepository;
Expand All @@ -19,17 +18,14 @@ class AdminRoleTest extends UnitTest
{
public function testAnnotations(): void
{
$reflection = new ReflectionClass(AdminRole::class);
$entity = $reflection->getAttributes(Entity::class);
$table = $reflection->getAttributes(Table::class);
$hasLifecycleCallbacks = $reflection->getAttributes(HasLifecycleCallbacks::class);
$reflection = new ReflectionClass(AdminRole::class);
$entity = $reflection->getAttributes(Entity::class);
$table = $reflection->getAttributes(Table::class);

$this->assertNotEmpty($entity[0]);
$this->assertNotEmpty($table[0]);
$this->assertNotEmpty($hasLifecycleCallbacks[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $entity[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $table[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $hasLifecycleCallbacks[0]);

$entityArguments = $entity[0]->getArguments();
$tableArguments = $table[0]->getArguments();
Expand Down
10 changes: 3 additions & 7 deletions test/Unit/Admin/Entity/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\Table;
use Frontend\Admin\Entity\Admin;
use Frontend\Admin\Entity\AdminRole;
Expand Down Expand Up @@ -39,17 +38,14 @@ protected function setUp(): void

public function testAnnotations(): void
{
$reflection = new ReflectionClass(Admin::class);
$entity = $reflection->getAttributes(Entity::class);
$table = $reflection->getAttributes(Table::class);
$hasLifecycleCallbacks = $reflection->getAttributes(HasLifecycleCallbacks::class);
$reflection = new ReflectionClass(Admin::class);
$entity = $reflection->getAttributes(Entity::class);
$table = $reflection->getAttributes(Table::class);

$this->assertNotEmpty($entity[0]);
$this->assertNotEmpty($table[0]);
$this->assertNotEmpty($hasLifecycleCallbacks[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $entity[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $table[0]);
$this->assertInstanceOf(ReflectionAttribute::class, $hasLifecycleCallbacks[0]);

$entityArguments = $entity[0]->getArguments();
$tableArguments = $table[0]->getArguments();
Expand Down