Google\Cloud\Tests\Datastore\TransactionTest::testLookup PHP Méthode

testLookup() public méthode

public testLookup ( )
    public function testLookup()
    {
        $this->operation->lookup(Argument::type('array'), Argument::that(function ($arg) {
            if ($arg['transaction'] !== $this->transactionId) {
                return false;
            }
            return true;
        }))->willReturn(['found' => ['foo']]);
        $this->transaction->setOperation($this->operation->reveal());
        $k = $this->prophesize(Key::class);
        $res = $this->transaction->lookup($k->reveal());
        $this->assertEquals($res, 'foo');
    }