Google\Cloud\Tests\Datastore\DatastoreClientTest::testDelete PHP Method

testDelete() public method

public testDelete ( )
    public function testDelete()
    {
        $this->operation->commit(Argument::type('array'), Argument::type('array'))->shouldBeCalled()->willReturn(['mutationResults' => [['version' => '1234']]]);
        $this->operation->mutation(Argument::exact('delete'), Argument::type(Key::class), Argument::exact(Key::class), Argument::exact(null))->shouldBeCalled();
        $this->datastore->setOperation($this->operation->reveal());
        $key = $this->prophesize(Key::class);
        $res = $this->datastore->delete($key->reveal());
        $this->assertEquals($res, '1234');
    }