entityManager = self::$container->get('doctrine.orm.default_entity_manager'); } public function testGuestUser(): void { $origineUser = null; $userIdentityManager = new UserIdentityManager($this->entityManager, $origineUser); $expectedUser = $userIdentityManager->getUser(); $this->assertEquals(SystemSlugType::GUEST_USER, $expectedUser->getSource()->getSlug()); } public function testUser(): void { $origineUser = new User(); $userIdentityManager = new UserIdentityManager($this->entityManager, $origineUser); $expectedUser = $userIdentityManager->getUser(); $this->assertEquals($origineUser, $expectedUser); } }