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

testExport() public method

public testExport ( )
    public function testExport()
    {
        $storage = new \StorageClientStub();
        $storage->setConnection($this->prophesize(StorageConnectionInterface::class)->reveal());
        $snippet = $this->snippetFromMethod(Table::class, 'export');
        $snippet->addLocal('storage', $storage);
        $snippet->addLocal('table', $this->table);
        $this->connection->insertJob(Argument::any())->shouldBeCalled()->willReturn(['jobReference' => ['jobId' => '123']]);
        $this->table->setConnection($this->connection->reveal());
        $res = $snippet->invoke('job');
        $this->assertInstanceOf(Job::class, $res->returnVal());
    }