Google\Cloud\Tests\Snippets\BigQuery\QueryResultsTest::testRows PHP Method

testRows() public method

public testRows ( )
    public function testRows()
    {
        $snippet = $this->snippetFromMethod(QueryResults::class, 'rows');
        $snippet->addLocal('queryResults', $this->qr);
        $this->info['jobComplete'] = true;
        $this->connection->getQueryResults(Argument::any())->willReturn($this->info);
        $this->qr->setConnection($this->connection->reveal());
        $this->qr->reload();
        $res = $snippet->invoke();
        $this->assertEquals('abcd', trim($res->output()));
    }