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

testRelationshipEntitiesShouldBeManaged() public method

    public function testRelationshipEntitiesShouldBeManaged()
    {
        $tom = $this->getPerson('Tom Hanks');
        foreach ($tom->getRoles() as $role) {
            $role->setRoles(['Super Tom']);
        }
        $this->em->flush();
        $this->em->clear();
        $tom2 = $this->getPerson('Tom Hanks');
        foreach ($tom2->getRoles() as $role) {
            $this->assertEquals('Super Tom', $role->getRoles()[0]);
        }
    }