GraphAware\Neo4j\OGM\Tests\Integration\SingleEntityTest::testDeletedEntitiesCannotBePersistedAfterwards PHP Метод

testDeletedEntitiesCannotBePersistedAfterwards() публичный Метод

    public function testDeletedEntitiesCannotBePersistedAfterwards()
    {
        $this->clearDb();
        $user = new User('john');
        $this->em->persist($user);
        $this->em->flush();
        $this->assertGraphExist('(u:User {login:"john"})');
        $this->em->remove($user);
        $this->em->flush();
        $this->assertGraphNotExist('(u:User {login:"john"})');
        $this->setExpectedException(LogicException::class);
        $this->em->persist($user);
    }