Skip to content

Commit

Permalink
Including a test case to check the fix of the issue lphuberdeau#54.
Browse files Browse the repository at this point in the history
  • Loading branch information
tom committed Jan 24, 2014
1 parent 02edd23 commit e9cef1d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lib/HireVoice/Neo4j/Tests/EntityManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,33 @@ function testStoreLabeledEntity()
$this->assertEquals("Location", $city->offsetGet(0));
$this->assertEquals("City", $city->offsetGet(1));
}

/**
* Check the fix of issue #54.
*/
function testRemoveEntity()
{
$entity = new Entity\Movie;
$entity->setTitle('Jules et Jim');

$em = $this->getEntityManager();
$em->persist($entity);
$em->flush();

$em->remove($entity);
$em->flush();

$entity2 = new Entity\Movie;
$entity2->setTitle('Rois et reine');
$em->persist($entity2);
$em->flush();

// one only checks that a second flush
// after a remove does not throw an exception
// if not the test is ok.

$this->assertTrue(true);
}
}

/**
Expand Down

0 comments on commit e9cef1d

Please sign in to comment.