GraphAware\Neo4j\OGM\Tests\Integration\NativeQuery\QueryResultMappingITTest::testNativeQueryResultMapping PHP Method

testNativeQueryResultMapping() public method

    public function testNativeQueryResultMapping()
    {
        $this->createGraph();
        /** @var PostRepository $repository */
        $repository = $this->em->getRepository(Post::class);
        $this->assertInstanceOf(PostRepository::class, $repository);
        /** @var NewsFeed[] $result */
        $feeds = $repository->getNewsFeed();
        foreach ($feeds as $feed) {
            $this->assertInstanceOf(NewsFeed::class, $feed);
        }
        $this->assertEquals('Graph Aided Search', $feeds[0]->getPost()->getTitle());
    }