ru_php/ext/standard/tests/dir/scandir_invalid_flag.phpt

13 lines
308 B
PHP

--TEST--
Provide wrong flags to scandir()
--FILE--
<?php
try {
scandir('something', -1);
} catch (ValueError $e) {
echo $e->getMessage() . "\n";
}
?>
--EXPECT--
scandir(): Argument #2 ($sorting_order) must be one of the SCANDIR_SORT_ASCENDING, SCANDIR_SORT_DESCENDING, or SCANDIR_SORT_NONE constants