mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-24 08:58:06 +02:00
24 lines
584 B
PHP
24 lines
584 B
PHP
--TEST--
|
|
MongoDB\Driver\Manager::executeUpdate() write error
|
|
--SKIPIF--
|
|
<?php require __DIR__ . "/../utils/basic-skipif.inc"; CLEANUP(STANDALONE) ?>
|
|
--FILE--
|
|
<?php
|
|
require_once __DIR__ . "/../utils/basic.inc";
|
|
|
|
$manager = new MongoDB\Driver\Manager(STANDALONE);
|
|
|
|
$manager->executeInsert(NS, ['x' => 1]);
|
|
|
|
echo throws(function() use ($manager) {
|
|
$manager->executeUpdate(NS, ['x' => 1], ['$foo' => 1]);
|
|
}, 'MongoDB\Driver\Exception\WriteException'), "\n";
|
|
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECT--
|
|
OK: Got MongoDB\Driver\Exception\WriteException
|
|
Unknown modifier: $foo
|
|
===DONE===
|