// SYSTEM PANEL //
[ROOT]
/
opt
/
alt
/
tests
/
alt-php83-pecl-mongodb_1.18.1-1.el8
/
tests
[ PARENT ]
EDIT :: manager-invalidnamespace.phpt
--TEST-- MongoDB\Driver\Manager: Invalid namespace --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php skip_if_not_live(); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $manager = create_test_manager(); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(array("my" => "value")); echo throws(function() use($manager, $bulk) { $manager->executeBulkWrite("database", $bulk); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; echo throws(function() use($manager) { $manager->executeQuery("database", new MongoDB\Driver\Query(array("document "=> 1))); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid namespace provided: database OK: Got MongoDB\Driver\Exception\InvalidArgumentException Invalid namespace provided: database ===DONE===
SAVE
CANCEL