Google\Cloud\Tests\Snippets\Datastore\TransactionTest::testDeleteBatch PHP Method

testDeleteBatch() public method

public testDeleteBatch ( )
    public function testDeleteBatch()
    {
        $snippet = $this->snippetFromMethod(Transaction::class, 'deleteBatch');
        $snippet->addLocal('datastore', $this->datastore);
        $snippet->addLocal('transaction', $this->transaction);
        $this->connection->commit(Argument::that(function ($args) {
            if ($args['transaction'] !== $this->transactionId) {
                return false;
            }
            if (array_keys($args['mutations'][0])[0] !== 'delete') {
                return false;
            }
            return true;
        }))->shouldBeCalled();
        $res = $snippet->invoke();
    }