GraphAware\Neo4j\OGM\Tests\Integration\RelationshipIntegrationTest::testRelatedEntitiesAreFetched PHP Метод

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

    public function testRelatedEntitiesAreFetched()
    {
        $company = new Company('Acme');
        $user = new User('ikwattro');
        $company->addEmployee($user);
        $this->em->persist($company);
        $this->em->flush();
        $this->em->clear();
        $repo = $this->em->getRepository(User::class);
        $user = $repo->findOneBy('login', 'ikwattro');
        $this->assertInstanceOf(Company::class, $user->getCurrentCompany());
    }