public function testRelatedEntitiesAreCorrectlyFetchedWhenRootEntityIsFoundById()
{
$this->playMovies();
$id = $this->client->run('MATCH (m:Movie) WHERE m.title = "The Matrix" RETURN id(m) as id')->firstRecord()->get('id');
/** @var Movie $movie */
$movie = $this->em->getRepository(Movie::class)->findOneById($id);
$this->assertEquals($id, $movie->id);
foreach ($movie->actors as $actor) {
$this->assertInstanceOf(Person::class, $actor);
}
}