1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/openssl/tests/openssl_random_pseudo_bytes_error.phpt
Máté Kocsis 01b266aac4 Improve error messages of various extensions
Closes GH-5278
2020-03-23 18:59:04 +01:00

15 lines
336 B
PHP

--TEST--
Test error operation of openssl_random_pseudo_bytes()
--SKIPIF--
<?php if (!extension_loaded("openssl")) print "skip"; ?>
--FILE--
<?php
try {
openssl_random_pseudo_bytes(0);
} catch (Error $e) {
echo $e->getMessage().PHP_EOL;
}
?>
--EXPECT--
openssl_random_pseudo_bytes(): Argument #1 ($length) must be greater than 0