null pointer safeguards
[m6w6/ext-psi] / tests / stat / stat001.phpt
1 --TEST--
2 stat
3 --INI--
4 psi.directory={PWD}/../../psi.d:{PWD}
5 --SKIPIF--
6 <?php
7 extension_loaded("psi") or die("skip - need ext/psi");
8 PHP_OS === "Linux" or die("skip - only for Linux");
9 ?>
10 --FILE--
11 ===TEST===
12 <?php
13 var_dump(psi\stat(__FILE__, $stat), $stat);
14 ?>
15 ===DONE===
16 --EXPECTF--
17 ===TEST===
18 int(0)
19 array(16) {
20 ["st_dev"]=>
21 int(%d)
22 ["st_ino"]=>
23 int(%d)
24 ["st_mode"]=>
25 int(%d)
26 ["st_nlink"]=>
27 int(1)
28 ["st_uid"]=>
29 int(%d)
30 ["st_gid"]=>
31 int(%d)
32 ["st_rdev"]=>
33 int(%d)
34 ["st_size"]=>
35 int(75)
36 ["st_atim"]=>
37 array(2) {
38 ["tv_sec"]=>
39 int(1%d)
40 ["tv_nsec"]=>
41 int(%d)
42 }
43 ["st_atime"]=>
44 int(%d)
45 ["st_mtim"]=>
46 array(2) {
47 ["tv_sec"]=>
48 int(1%d)
49 ["tv_nsec"]=>
50 int(%d)
51 }
52 ["st_mtime"]=>
53 int(%d)
54 ["st_ctim"]=>
55 array(2) {
56 ["tv_sec"]=>
57 int(1%d)
58 ["tv_nsec"]=>
59 int(%d)
60 }
61 ["st_ctime"]=>
62 int(%d)
63 ["st_blksize"]=>
64 int(%d)
65 ["st_blocks"]=>
66 int(%d)
67 }
68 ===DONE===