mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
f7d426cca6
* Unify structure for ext/random's engine tests (2)
This makes adjustments that were missed in
2d6a883b3a.
* Add `engines.inc` for ext/random tests
* Unify structure for ext/random's randomizer tests
18 lines
351 B
PHP
18 lines
351 B
PHP
--TEST--
|
|
Random: Randomizer: Serialization of the Randomizer fails if the engine is not serializable
|
|
--FILE--
|
|
<?php
|
|
|
|
use Random\Engine\Secure;
|
|
use Random\Randomizer;
|
|
|
|
try {
|
|
serialize(new Randomizer(new Secure()));
|
|
} catch (Exception $e) {
|
|
echo $e->getMessage(), PHP_EOL;
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Serialization of 'Random\Engine\Secure' is not allowed
|