GraphAware\Neo4j\OGM\Tests\Integration\SingleEntityTest::testFindById PHP Method

testFindById() public method

public testFindById ( )
    public function testFindById()
    {
        $q = 'CREATE (n:User) RETURN n';
        $result = $this->client->run($q);
        $id = $result->firstRecord()->get('n')->identity();
        $user = $this->em->getRepository(User::class)->findOneById($id);
        $this->assertInstanceOf(User::class, $user);
        $this->assertEquals($id, $user->getId());
    }