Annotation of embedaddon/php/ext/standard/tests/general_functions/get_included_files.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test get_include_files() function
3: --INI--
4: include_path=.
5: --FILE--
6: <?php
7: /* Prototype: array get_included_files ( void )
8: * Description: Returns an array with the names of included or required files
9:
10: */
11:
12: echo "*** Testing get_included_files()\n";
13:
14: echo "\n-- List included files at start --\n";
15: var_dump(get_included_files());
16:
17: include(dirname(__FILE__)."/get_included_files_inc1.inc");
18: echo "\n-- List included files atfter including inc1 -\n";
19: var_dump(get_included_files());
20:
21: include(dirname(__FILE__)."/get_included_files_inc2.inc");
22: echo "\n-- List included files atfter including inc2 which will include inc3 which includes inc1 --\n";
23: var_dump(get_included_files());
24:
25: echo "\n-- Error cases --\n";
26: var_dump(get_included_files(true));
27:
28: ?>
29: ===DONE===
30: --EXPECTF--
31: *** Testing get_included_files()
32:
33: -- List included files at start --
34: array(1) {
35: [0]=>
36: string(%d) "%sget_included_files.php"
37: }
38:
39: -- List included files atfter including inc1 -
40: array(2) {
41: [0]=>
42: string(%d) "%sget_included_files.php"
43: [1]=>
44: string(%d) "%sget_included_files_inc1.inc"
45: }
46:
47: -- List included files atfter including inc2 which will include inc3 which includes inc1 --
48: array(4) {
49: [0]=>
50: string(%d) "%sget_included_files.php"
51: [1]=>
52: string(%d) "%sget_included_files_inc1.inc"
53: [2]=>
54: string(%d) "%sget_included_files_inc2.inc"
55: [3]=>
56: string(%d) "%sget_included_files_inc3.inc"
57: }
58:
59: -- Error cases --
60:
61: Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
62: NULL
63: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>