mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-28 11:03:10 +02:00
25 lines
729 B
PHP
25 lines
729 B
PHP
--TEST--
|
|
MongoDB\Driver\Server::executeBulkWrite() with empty BulkWrite
|
|
--SKIPIF--
|
|
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
|
|
<?php skip_if_not_live(); ?>
|
|
<?php skip_if_not_clean(); ?>
|
|
--FILE--
|
|
<?php
|
|
require_once __DIR__ . "/../utils/basic.inc";
|
|
|
|
$manager = new MongoDB\Driver\Manager(URI);
|
|
$server = $manager->selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY));
|
|
|
|
echo throws(function() use ($server) {
|
|
$server->executeBulkWrite(NS, new MongoDB\Driver\BulkWrite);
|
|
}, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n";
|
|
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECTF--
|
|
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
|
|
Cannot do an empty bulk write
|
|
===DONE===
|