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

testRows() public method

public testRows ( )
    public function testRows()
    {
        $snippet = $this->snippetFromMethod(Table::class, 'rows');
        $snippet->addLocal('table', $this->table);
        $this->connection->listTableData(Argument::any())->shouldBeCalled()->willReturn(['rows' => $this->info['rows']]);
        $this->table->setConnection($this->connection->reveal());
        $res = $snippet->invoke('rows');
        $this->assertInstanceOf(\Generator::class, $res->returnVal());
        $this->assertEquals('abcd', $res->output());
    }