Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
self
/
root
/
opt
/
php-7.2
/
share
/
test
/
mongodb
/
tests
/
bson
/
//proc/self/root/opt/php-7.2/share/test/mongodb/tests/bson/bson-timestamp-set_state_error-001.phpt
--TEST-- MongoDB\BSON\Timestamp::__set_state() requires "increment" and "timestamp" integer fields --FILE-- <?php require_once __DIR__ . '/../utils/tools.php'; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => 1234]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['timestamp' => 5678]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => '1234', 'timestamp' => 5678]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Timestamp::__set_state(['increment' => 1234, 'timestamp' => '5678']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Timestamp initialization requires "increment" and "timestamp" integer or numeric string fields ===DONE===