Google\Cloud\Tests\BigQuery\BigQueryClientTest::testRunsQueryAsJob PHP Method

testRunsQueryAsJob() public method

public testRunsQueryAsJob ( $query, $options, $expected )
    public function testRunsQueryAsJob($query, $options, $expected)
    {
        $projectId = $expected['projectId'];
        unset($expected['projectId']);
        $this->connection->insertJob(['projectId' => $projectId, 'configuration' => ['query' => $expected]])->willReturn(['jobReference' => ['jobId' => $this->jobId]])->shouldBeCalledTimes(1);
        $this->client->setConnection($this->connection->reveal());
        $job = $this->client->runQueryAsJob($query, $options);
        $this->assertInstanceOf(Job::class, $job);
        $this->assertEquals($this->jobId, $job->id());
    }