1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Files
archived-php-src/ext/random/tests/02_engine/mt19937_error.phpt
Tim Düsterhus 2d6a883b3a Unify structure for ext/random's engine tests (#9321)
* Remove user_xoshiro128plusplus.phpt

This test does not exercise any of the code paths of the random extension and
thus is no value-add.

* Unify structure for ext/random's engine tests
2022-08-23 23:55:11 +02:00

17 lines
341 B
PHP

--TEST--
Random: Engine: Mt19937: Invalid $mode parameter values must be rejected
--FILE--
<?php
use Random\Engine\Mt19937;
try {
new Mt19937(1234, 2);
} catch (ValueError $e) {
echo $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
Random\Engine\Mt19937::__construct(): Argument #2 ($mode) must be either MT_RAND_MT19937 or MT_RAND_PHP