File tree Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ Test opendir() function : basic functionality
13
13
14
14
echo "*** Testing opendir() : basic functionality *** \n" ;
15
15
16
- $ base_dir_path = dirname (__FILE__ );
16
+ $ base_dir_path = __DIR__ . '/opendir_basic ' ;
17
+ @mkdir ($ base_dir_path );
17
18
18
19
$ level_one_dir_name = "level_one " ;
19
20
$ level_one_dir_path = "$ base_dir_path/ $ level_one_dir_name " ;
@@ -42,9 +43,10 @@ var_dump($dh2);
42
43
===DONE===
43
44
--CLEAN--
44
45
<?php
45
- $ file_path = dirname (__FILE__ );
46
- rmdir ("$ file_path/level_one/level_two " );
47
- rmdir ("$ file_path/level_one " );
46
+ $ base_dir_path = __DIR__ . '/opendir_basic ' ;
47
+ rmdir ("$ base_dir_path/level_one/level_two " );
48
+ rmdir ("$ base_dir_path/level_one " );
49
+ rmdir ($ base_dir_path );
48
50
?>
49
51
--EXPECTF--
50
52
*** Testing opendir() : basic functionality ***
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ Test opendir() function : usage variations - different relative paths
13
13
14
14
echo "*** Testing opendir() : usage variation *** \n" ;
15
15
16
- $ base_dir_path = dirname (__FILE__ );
16
+ $ base_dir_path = __DIR__ . '/opendir_variation4 ' ;
17
+ @mkdir ($ base_dir_path );
17
18
18
19
$ level_one_dir_name = "level_one " ;
19
20
$ level_one_dir_path = "$ base_dir_path/ $ level_one_dir_name " ;
@@ -72,9 +73,10 @@ function clean_dh($dh){
72
73
===DONE===
73
74
--CLEAN--
74
75
<?php
75
- $ file_path = dirname (__FILE__ );
76
- rmdir ("$ file_path/level_one/level_two " );
77
- rmdir ("$ file_path/level_one " );
76
+ $ base_dir_path = __DIR__ . '/opendir_variation4 ' ;
77
+ rmdir ("$ base_dir_path/level_one/level_two " );
78
+ rmdir ("$ base_dir_path/level_one " );
79
+ rmdir ($ base_dir_path );
78
80
?>
79
81
--EXPECTF--
80
82
*** Testing opendir() : usage variation ***
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ echo "*** Testing scandir() : usage variations ***\n";
16
16
// include for create_files/delete_files functions
17
17
include (dirname (__FILE__ ) . '/../file/file.inc ' );
18
18
19
- $ base_dir_path = dirname (__FILE__ );
19
+ $ base_dir_path = __DIR__ . '/scandir_variation4 ' ;
20
+ @mkdir ($ base_dir_path );
20
21
21
22
$ level_one_dir_path = "$ base_dir_path/level_one " ;
22
23
$ level_two_dir_path = "$ level_one_dir_path/level_two " ;
@@ -61,9 +62,10 @@ var_dump(scandir('../../level_one'));
61
62
===DONE===
62
63
--CLEAN--
63
64
<?php
64
- $ dir_path = dirname (__FILE__ );
65
- rmdir ("$ dir_path/level_one/level_two " );
66
- rmdir ("$ dir_path/level_one " );
65
+ $ base_dir_path = __DIR__ . '/scandir_variation4 ' ;
66
+ rmdir ("$ base_dir_path/level_one/level_two " );
67
+ rmdir ("$ base_dir_path/level_one " );
68
+ rmdir ($ base_dir_path );
67
69
?>
68
70
--EXPECT--
69
71
*** Testing scandir() : usage variations ***
You can’t perform that action at this time.
0 commit comments