/** * @group flush-1 * @group flush */ public function testManagedEntityIsFlushedOnBooleanLabelUpdate() { $user = new User('ikwattro'); $user->setActive(); $this->em->persist($user); $this->em->flush(); $this->assertGraphExist('(u:User:Active {login:"******"})'); $user->setInactive(); $this->assertFalse($user->isActive()); $this->em->flush(); $this->assertGraphNotExist('(u:User:Active {login:"******"})'); }
/** * @group label */ public function testExtraLabelsAreHydrated() { $user = new User('ikwattro'); $user->setActive(); $this->em->persist($user); $this->em->flush(); $this->em->clear(); /** @var User $ikwattro */ $ikwattro = $this->em->getRepository(User::class)->findOneBy('login', 'ikwattro'); $this->assertTrue($ikwattro->isActive()); }