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

testCommitWithMutation() public méthode

    public function testCommitWithMutation()
    {
        $this->connection->commit(Argument::that(function ($arg) {
            if (count($arg['mutations']) !== 1) {
                return false;
            }
            return true;
        }))->shouldBeCalled()->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]);
    }