Annotation of embedaddon/php/ext/standard/tests/dir/getcwd_error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test getcwd() function : error conditions - Incorrect number of arguments
3: --FILE--
4: <?php
5: /* Prototype : mixed getcwd(void)
6: * Description: Gets the current directory
7: * Source code: ext/standard/dir.c
8: */
9:
10: /*
11: * Pass incorrect number of arguments to getcwd() to test behaviour
12: */
13:
14: echo "*** Testing getcwd() : error conditions ***\n";
15:
16: // One argument
17: echo "\n-- Testing getcwd() function with one argument --\n";
18: $extra_arg = 10;
19: var_dump( getcwd($extra_arg) );
20: ?>
21: ===DONE===
22: --EXPECTF--
23: *** Testing getcwd() : error conditions ***
24:
25: -- Testing getcwd() function with one argument --
26:
27: Warning: getcwd() expects exactly 0 parameters, 1 given in %s on line %d
28: NULL
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>