Annotation of embedaddon/php/ext/standard/tests/file/filegroup_error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test filegroup() function: error conditions
3: --FILE--
4: <?php
5: /* Prototype: int filegroup ( string $filename )
6: * Description: Returns the group ID of the file, or FALSE in case of an error.
7: */
8:
9: echo "*** Testing filegroup(): error conditions ***\n";
10:
11: /* Non-existing file or dir */
12: var_dump( filegroup("/no/such/file/dir") );
13:
14: /* Invalid arguments */
15: var_dump( filegroup("string") );
16: var_dump( filegroup(100) );
17:
18: /* Invalid no.of arguments */
19: var_dump( filegroup() ); // args < expected
20: var_dump( filegroup("/no/such/file", "root") ); // args > expected
21:
22: echo "\n*** Done ***\n";
23: ?>
24:
25: --EXPECTF--
26: *** Testing filegroup(): error conditions ***
27:
28: Warning: filegroup(): stat failed for /no/such/file/dir in %s on line %d
29: bool(false)
30:
31: Warning: filegroup(): stat failed for string in %s on line %d
32: bool(false)
33:
34: Warning: filegroup(): stat failed for 100 in %s on line %d
35: bool(false)
36:
37: Warning: filegroup() expects exactly 1 parameter, 0 given in %s on line %d
38: NULL
39:
40: Warning: filegroup() expects exactly 1 parameter, 2 given in %s on line %d
41: NULL
42:
43: *** Done ***
44:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>