diff --git a/application/symfony/tests/Unit/Domain/UserManagement/UserSourceDirectorServiceTest.php b/application/symfony/tests/Unit/Domain/UserManagement/UserSourceDirectorServiceTest.php new file mode 100644 index 0000000..8c82077 --- /dev/null +++ b/application/symfony/tests/Unit/Domain/UserManagement/UserSourceDirectorServiceTest.php @@ -0,0 +1,37 @@ +get('doctrine.orm.default_entity_manager'); + $this->userSourceDirectorService = new UserSourceDirectorService($entityManager, $security); + } + + public function testGuestUser(): void + { + $user = $this->userSourceDirectorService->getUser(); + $this->assertInstanceOf(User::class, $user); + $this->assertInstanceOf(SourceInterface::class, $user->getSource()); + } +} diff --git a/application/symfony/tests/Unit/Entity/AbstractEntityTest.php b/application/symfony/tests/Unit/Entity/AbstractEntityTest.php index 186b2fe..54cb46f 100644 --- a/application/symfony/tests/Unit/Entity/AbstractEntityTest.php +++ b/application/symfony/tests/Unit/Entity/AbstractEntityTest.php @@ -39,9 +39,4 @@ class AbstractEntityTest extends TestCase $this->assertNull($this->entity->setId($id)); $this->assertEquals($id, $this->entity->getId()); } - - public function testToString(): void - { - $this->assertEquals(true, is_string($this->entity->__toString())); - } }