Files
mongo-php-driver/tests/writeConcern/writeconcern_error-001.phpt
T
Derick Rethans b31ad7c271 PHPC-129: Split out WriteConcern constructor error test
The error test should be skipped for HHVM, since it currently has inconsistent error handling.
2015-08-05 21:11:16 -04:00

22 lines
600 B
PHP

--TEST--
MongoDB\Driver\WriteConcern construction (invalid arguments)
--SKIPIF--
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
<?php if (defined("HHVM_VERSION_ID")) exit("skip HHVM throws Exception instead of InvalidArgumentException"); ?>
--FILE--
<?php
require_once __DIR__ . "/../utils/basic.inc";
try {
new MongoDB\Driver\WriteConcern("string", 10000, false, true, 1);
} catch(InvalidArgumentException $e) {
echo $e->getMessage(), "\n";
}
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
MongoDB\Driver\WriteConcern::__construct() expects at most 4 parameters, 5 given
===DONE===