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

testInsertsRow() public method

public testInsertsRow ( )
    public function testInsertsRow()
    {
        $insertId = '1';
        $rowData = ['key' => 'value'];
        $expectedArguments = ['tableId' => $this->tableId, 'projectId' => $this->projectId, 'datasetId' => $this->datasetId, 'rows' => [['json' => $rowData, 'insertId' => $insertId]]];
        $this->connection->insertAllTableData($expectedArguments)->willReturn([])->shouldBeCalledTimes(1);
        $table = $this->getTable($this->connection);
        $insertResponse = $table->insertRow($rowData, ['insertId' => $insertId]);
        $this->assertInstanceOf(InsertResponse::class, $insertResponse);
        $this->assertTrue($insertResponse->isSuccessful());
    }