Google\Cloud\Tests\Datastore\TransactionTest::testRunQuery PHP Method

testRunQuery() public method

public testRunQuery ( )
    public function testRunQuery()
    {
        $this->operation->runQuery(Argument::type(QueryInterface::class), Argument::that(function ($arg) {
            if ($arg['transaction'] !== $this->transactionId) {
                return false;
            }
            return true;
        }))->willReturn('test');
        $this->transaction->setOperation($this->operation->reveal());
        $q = $this->prophesize(QueryInterface::class);
        $res = $this->transaction->runQuery($q->reveal());
        $this->assertEquals($res, 'test');
    }