1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Files
archived-php-src/ext/standard/tests/file/chmod_error.phpt
T
2019-03-11 11:32:20 +01:00

25 lines
543 B
PHP

--TEST--
Test chmod() function : error conditions
--FILE--
<?php
/* Prototype : bool chmod(string filename, int mode)
* Description: Change file mode
* Source code: ext/standard/filestat.c
* Alias to functions:
*/
echo "*** Testing chmod() : error conditions ***\n";
// testing chmod with a non-existing file
$filename = "___nonExisitingFile___";
var_dump(chmod($filename, 0777));
?>
===DONE===
--EXPECTF--
*** Testing chmod() : error conditions ***
Warning: chmod(): No such file or directory in %s on line %d
bool(false)
===DONE===