Google\Cloud\Tests\Datastore\DatastoreClientTest::testRunQuery PHP Method

testRunQuery() public method

public testRunQuery ( )
    public function testRunQuery()
    {
        $queryResult = json_decode(file_get_contents(__DIR__ . '/../fixtures/datastore/query-results.json'), true);
        $this->operation->runQuery(Argument::type(QueryInterface::class), Argument::type('array'))->shouldBeCalled()->willReturn('foo');
        $this->datastore->setOperation($this->operation->reveal());
        $q = $this->datastore->query();
        $res = $this->datastore->runQuery($q);
        $this->assertEquals($res, 'foo');
    }