GraphAware\Neo4j\OGM\Tests\Integration\LazyLoadingIntegrationTest::testCanTraverseRecursively PHP Method

testCanTraverseRecursively() public method

    public function testCanTraverseRecursively()
    {
        /** @var Company $company */
        $company = $this->em->getRepository(Company::class)->findOneBy('name', 'Acme');
        $this->assertCount(10, $company->getEmployees());
        $employee = $company->getEmployees()[0];
        $this->assertInstanceOf(LazyRelationshipCollection::class, $employee->getLovedBy());
        $this->assertCount(9, $employee->getLovedBy());
        $this->assertCount(9, $employee->getLoves());
    }