Google\Cloud\Tests\System\BigQuery\LoadDataAndQueryTest::testRunQueryWithPositionalParameters PHP Method

testRunQueryWithPositionalParameters() public method

    public function testRunQueryWithPositionalParameters()
    {
        $results = self::$client->runQuery('SELECT 1 IN UNNEST(?) AS arr', ['parameters' => [[1, 2, 3]]]);
        $backoff = new ExponentialBackoff(8);
        $backoff->execute(function () use($results) {
            $results->reload();
            if (!$results->isComplete()) {
                throw new \Exception();
            }
        });
        if (!$results->isComplete()) {
            $this->fail('Query did not complete within the allotted time.');
        }
        $actualRows = iterator_to_array($results->rows());
        $expectedRows = [['arr' => true]];
        $this->assertEquals($expectedRows, $actualRows);
    }