Google\Cloud\Tests\Snippets\Datastore\DatastoreClientTest::testUpdateBatch PHP Method

testUpdateBatch() public method

public testUpdateBatch ( )
    public function testUpdateBatch()
    {
        $snippet = $this->snippetFromMethod(DatastoreClient::class, 'updateBatch');
        $snippet->addLocal('datastore', $this->client);
        $snippet->addLocal('entities', [$this->client->entity($this->client->key('Person', 'Bob'), [], ['populatedByService' => true]), $this->client->entity($this->client->key('Person', 'John'), [], ['populatedByService' => true])]);
        $this->connection->commit(Argument::that(function ($args) {
            if (array_keys($args['mutations'][0])[0] !== 'update') {
                return false;
            }
            return true;
        }))->shouldBeCalled();
        $res = $snippet->invoke();
    }