Google\Cloud\Tests\BigQuery\TableTest::testRunsLoadJob PHP Method

testRunsLoadJob() public method

public testRunsLoadJob ( )
    public function testRunsLoadJob()
    {
        $data = 'abc';
        $uploader = $this->prophesize(AbstractUploader::class);
        $uploader->upload()->willReturn($this->insertJobResponse)->shouldBeCalledTimes(1);
        $expectedArguments = ['data' => $data, 'projectId' => $this->projectId, 'configuration' => ['load' => ['destinationTable' => ['datasetId' => $this->datasetId, 'tableId' => $this->tableId, 'projectId' => $this->projectId]]]];
        $this->connection->insertJobUpload(Argument::exact($expectedArguments))->willReturn($uploader)->shouldBeCalledTimes(1);
        $table = $this->getTable($this->connection);
        $job = $table->load($data);
        $this->assertInstanceOf(Job::class, $job);
        $this->assertEquals($this->insertJobResponse, $job->info());
    }