Google\Cloud\Tests\Datastore\OperationTest::testMutate PHP Méthode

testMutate() public méthode

public testMutate ( )
    public function testMutate()
    {
        $this->connection->commit(Argument::that(function ($arg) {
            if (count($arg['mutations']) !== 1) {
                return false;
            }
            if (!isset($arg['mutations'][0]['insert'])) {
                return false;
            }
            return true;
        }))->willReturn('foo');
        $this->operation->setConnection($this->connection->reveal());
        $key = $this->prophesize(Key::class);
        $e = new Entity($key->reveal());
        $mutation = $this->operation->mutation('insert', $e, Entity::class, null);
        $this->operation->commit([$mutation]);
    }