fileowner_error.phpt [plain text]
--TEST--
Test of fileowner() function: error conditions
--FILE--
<?php
echo "*** Testing fileowner(): error conditions ***\n";
var_dump( fileowner("/no/such/file/dir") );
var_dump( fileowner("string") );
var_dump( fileowner(100) );
var_dump( fileowner() ); var_dump( fileowner("/no/such/file", "root") );
echo "\n*** Done ***\n";
?>
--EXPECTF--
*** Testing fileowner(): error conditions ***
Warning: fileowner(): stat failed for /no/such/file/dir in %s on line %d
bool(false)
Warning: fileowner(): stat failed for string in %s on line %d
bool(false)
Warning: fileowner(): stat failed for 100 in %s on line %d
bool(false)
Warning: fileowner() expects exactly 1 parameter, 0 given in %s on line %d
NULL
Warning: fileowner() expects exactly 1 parameter, 2 given in %s on line %d
NULL
*** Done ***