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

testSingleRelationshipEntityIsFetched() public method

    public function testSingleRelationshipEntityIsFetched()
    {
        $this->clearDb();
        $this->playMovies();
        $this->client->run("MATCH (m:Movie {title:'The Matrix'})\n        CREATE (m)-[:HAS_SCORE {finalScore: 6.74}]->(:Score {value: 7})");
        /** @var Movie $matrix */
        $matrix = $this->em->getRepository(Movie::class)->findOneBy('title', 'The Matrix');
        $this->assertInstanceOf(ScoreRel::class, $matrix->getScore());
        $this->assertInstanceOf(Score::class, $matrix->getScore()->getScore());
        $this->assertEquals(6.74, $matrix->getScore()->getFinalScore());
    }