Annotation of embedaddon/php/ext/spl/tests/fileobject_getfileinfo_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: SplFileObject::getFileInfo
3: --CREDITS--
4: H�vard Eide <nucleuz at gmail.com>
5: #Testfest php.no
6: --INI--
7: include_path=.
8: --FILE--
9: <?php
10: $file = __FILE__;
11: $s = new SplFileObject( $file );
12: var_dump($fi = $s->getFileInfo(), (string)$fi);
13:
14: $d = new SplFileInfo( __DIR__ );
15: echo "\n";
16: var_dump($fi = $d->getFileInfo(), (string)$fi);
17: $d = new SplFileInfo( __DIR__."/" );
18: echo "\n";
19: var_dump($fi = $d->getFileInfo(), (string)$fi);
20: ?>
21: --EXPECTF--
22: object(SplFileInfo)#%d (2) {
23: ["pathName":"SplFileInfo":private]=>
24: string(%d) "%sext%espl%etests%efileobject_getfileinfo_basic.php"
25: ["fileName":"SplFileInfo":private]=>
26: string(%d) "fileobject_getfileinfo_basic.php"
27: }
28: string(%d) "%sext%espl%etests%efileobject_getfileinfo_basic.php"
29:
30: object(SplFileInfo)#%d (2) {
31: ["pathName":"SplFileInfo":private]=>
32: string(%d) "%sext%espl%etests"
33: ["fileName":"SplFileInfo":private]=>
34: string(%d) "tests"
35: }
36: string(%d) "%sext%espl%etests"
37:
38: object(SplFileInfo)#%d (2) {
39: ["pathName":"SplFileInfo":private]=>
40: string(%d) "%sext%espl%etests"
41: ["fileName":"SplFileInfo":private]=>
42: string(%d) "tests"
43: }
44: string(%d) "%sext%espl%etests"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>