GraphAware\Neo4j\Client\Tests\Integration\RelationshipEntityITest::testRelationshipEntityCanBeRemoved PHP Method

testRelationshipEntityCanBeRemoved() public method

    public function testRelationshipEntityCanBeRemoved()
    {
        $tom = $this->getPerson('Tom Hanks');
        $c = count($tom->getRoles());
        foreach ($tom->getRoles() as $role) {
            $tom->getRoles()->removeElement($role);
            break;
        }
        $this->em->flush();
        $this->em->clear();
        $tom = $this->getPerson('Tom Hanks');
        $this->assertEquals($c - 1, count($tom->getRoles()));
    }