Skip to content

Commit 634aa0a

Browse files
committed
Update tests
1 parent ba1d9cc commit 634aa0a

File tree

7 files changed

+47
-45
lines changed

7 files changed

+47
-45
lines changed

ext/standard/tests/dir/dir_variation1.phpt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
88
?>
99
--FILE--
1010
<?php
11-
/*
11+
/*
1212
* Prototype : object dir(string $directory[, resource $context])
1313
* Description: Directory class with properties, handle and class and methods read, rewind and close
1414
* Source code: ext/standard/dir.c
@@ -34,7 +34,7 @@ class A
3434
}
3535

3636
// get a resource variable
37-
$fp = fopen(__FILE__, "r"); // get a file handle
37+
$fp = fopen(__FILE__, "r"); // get a file handle
3838
$dfp = opendir( dirname(__FILE__) ); // get a dir handle
3939

4040
// unexpected values to be passed to $directory argument
@@ -92,27 +92,27 @@ echo "Done";
9292

9393
-- Iteration 1 --
9494

95-
Warning: dir() expects parameter 1 to be string, array given in %s on line %d
95+
Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
9696
NULL
9797

9898
-- Iteration 2 --
9999

100-
Warning: dir() expects parameter 1 to be string, array given in %s on line %d
100+
Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
101101
NULL
102102

103103
-- Iteration 3 --
104104

105-
Warning: dir() expects parameter 1 to be string, array given in %s on line %d
105+
Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
106106
NULL
107107

108108
-- Iteration 4 --
109109

110-
Warning: dir() expects parameter 1 to be string, array given in %s on line %d
110+
Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
111111
NULL
112112

113113
-- Iteration 5 --
114114

115-
Warning: dir() expects parameter 1 to be string, array given in %s on line %d
115+
Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
116116
NULL
117117

118118
-- Iteration 6 --
@@ -151,16 +151,16 @@ bool(false)
151151

152152
-- Iteration 16 --
153153

154-
Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
154+
Warning: dir() expects parameter 1 to be a valid path, resource given in %s on line %d
155155
NULL
156156

157157
-- Iteration 17 --
158158

159-
Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
159+
Warning: dir() expects parameter 1 to be a valid path, resource given in %s on line %d
160160
NULL
161161

162162
-- Iteration 18 --
163163

164-
Warning: dir() expects parameter 1 to be string, object given in %s on line %d
164+
Warning: dir() expects parameter 1 to be a valid path, object given in %s on line %d
165165
NULL
166-
Done
166+
Done

ext/standard/tests/dir/opendir_variation1-win32.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
99
--FILE--
1010
<?php
1111
/* Prototype : mixed opendir(string $path[, resource $context])
12-
* Description: Open a directory and return a dir_handle
12+
* Description: Open a directory and return a dir_handle
1313
* Source code: ext/standard/dir.c
1414
*/
1515

@@ -30,7 +30,7 @@ unset ($unset_var);
3030

3131
// get a class
3232
class classA {
33-
33+
3434
var $path;
3535
function __construct($path) {
3636
$this->path = $path;
@@ -73,7 +73,7 @@ $inputs = array(
7373
false,
7474
TRUE,
7575
FALSE,
76-
76+
7777
// empty data
7878
/*16*/ "",
7979
'',
@@ -83,7 +83,7 @@ $inputs = array(
8383
/*19*/ "$path",
8484
'string',
8585
$heredoc,
86-
86+
8787
// object data
8888
/*22*/ new classA($path),
8989

@@ -216,7 +216,7 @@ bool(false)
216216

217217
-- Iteration 18 --
218218

219-
Warning: opendir() expects parameter 1 to be string, array given in %s on line %d
219+
Warning: opendir() expects parameter 1 to be a valid path, array given in %s on line %d
220220
NULL
221221

222222
-- Iteration 19 --
@@ -243,6 +243,6 @@ bool(false)
243243

244244
-- Iteration 25 --
245245

246-
Warning: opendir() expects parameter 1 to be string, resource given in %s on line %d
246+
Warning: opendir() expects parameter 1 to be a valid path, resource given in %s on line %d
247247
NULL
248248
===DONE===

ext/standard/tests/dir/opendir_variation1.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
99
--FILE--
1010
<?php
1111
/* Prototype : mixed opendir(string $path[, resource $context])
12-
* Description: Open a directory and return a dir_handle
12+
* Description: Open a directory and return a dir_handle
1313
* Source code: ext/standard/dir.c
1414
*/
1515

@@ -30,7 +30,7 @@ unset ($unset_var);
3030

3131
// get a class
3232
class classA {
33-
33+
3434
var $path;
3535
function __construct($path) {
3636
$this->path = $path;
@@ -73,7 +73,7 @@ $inputs = array(
7373
false,
7474
TRUE,
7575
FALSE,
76-
76+
7777
// empty data
7878
/*16*/ "",
7979
'',
@@ -83,7 +83,7 @@ $inputs = array(
8383
/*19*/ "$path",
8484
'string',
8585
$heredoc,
86-
86+
8787
// object data
8888
/*22*/ new classA($path),
8989

@@ -194,7 +194,7 @@ bool(false)
194194

195195
-- Iteration 18 --
196196

197-
Warning: opendir() expects parameter 1 to be string, array given in %s on line %d
197+
Warning: opendir() expects parameter 1 to be a valid path, array given in %s on line %d
198198
NULL
199199

200200
-- Iteration 19 --
@@ -219,6 +219,6 @@ bool(false)
219219

220220
-- Iteration 25 --
221221

222-
Warning: opendir() expects parameter 1 to be string, resource given in %s on line %d
222+
Warning: opendir() expects parameter 1 to be a valid path, resource given in %s on line %d
223223
NULL
224224
===DONE===

ext/standard/tests/file/mkdir_rmdir_variation2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ bool(false)
6868
Warning: mkdir() expects parameter 1 to be a valid path, string given in %s on line %d
6969
bool(false)
7070

71-
Warning: rmdir(%s): No such file or directory in %s on line %d
71+
Warning: rmdir() expects parameter 1 to be a valid path, string given in %s on line %d
7272
bool(false)
7373

7474
*** Testing mkdir() with miscelleneous input ***

ext/standard/tests/file/tempnam_variation3-win32.phpt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ if (!mkdir($file_path)) {
2222

2323
$file_path = realpath($file_path);
2424

25-
/* An array of prefixes */
25+
/* An array of prefixes */
2626
$names_arr = array(
27-
/* Valid args (casting)*/
27+
/* Valid args (casting)*/
2828
-1,
2929
TRUE,
3030
FALSE,
3131
NULL,
3232
"",
3333
" ",
3434
"\0",
35-
/* Invalid args */
35+
/* Invalid args */
3636
array(),
3737

38-
/* Valid args*/
38+
/* Valid args*/
3939
/* prefix with path separator of a non existing directory*/
40-
"/no/such/file/dir",
40+
"/no/such/file/dir",
4141
"php/php"
4242
);
4343

4444
$res_arr = array(
45-
/* Invalid args */
45+
/* Invalid args */
4646
true,
4747
true,
4848
true,
@@ -53,7 +53,7 @@ $res_arr = array(
5353
false,
5454

5555
/* prefix with path separator of a non existing directory*/
56-
true,
56+
true,
5757
true
5858
);
5959

@@ -72,7 +72,7 @@ for( $i=0; $i<count($names_arr); $i++ ) {
7272
} else {
7373
echo "Failed, not created in the correct directory " . realpath($file_dir) . ' vs ' . $file_path ."\n";
7474
}
75-
75+
7676
if (!is_writable($file_name)) {
7777
printf("%o\n", fileperms($file_name) );
7878

@@ -105,7 +105,7 @@ Failed, not created in the correct directory %s vs %s
105105
OK
106106
-- Iteration 7 --
107107

108-
Warning: tempnam() expects parameter 2 to be string, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d
108+
Warning: tempnam() expects parameter 2 to be a valid path, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d
109109
OK
110110
-- Iteration 8 --
111111
OK

ext/standard/tests/file/tempnam_variation3.phpt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ echo "*** Testing tempnam() with obscure prefixes ***\n";
1717
$file_path = dirname(__FILE__)."/tempnamVar3";
1818
mkdir($file_path);
1919

20-
/* An array of prefixes */
20+
/* An array of prefixes */
2121
$names_arr = array(
22-
/* Invalid args */
22+
/* Invalid args */
2323
-1,
2424
TRUE,
2525
FALSE,
@@ -30,7 +30,7 @@ $names_arr = array(
3030
array(),
3131

3232
/* prefix with path separator of a non existing directory*/
33-
"/no/such/file/dir",
33+
"/no/such/file/dir",
3434
"php/php"
3535

3636
);
@@ -48,10 +48,10 @@ for( $i=0; $i<count($names_arr); $i++ ) {
4848
echo "File permissions are => ";
4949
printf("%o", fileperms($file_name) );
5050
echo "\n";
51-
51+
5252
echo "File created in => ";
5353
$file_dir = dirname($file_name);
54-
54+
5555
if ($file_dir == sys_get_temp_dir()) {
5656
echo "temp dir\n";
5757
}
@@ -61,7 +61,7 @@ for( $i=0; $i<count($names_arr); $i++ ) {
6161
else {
6262
echo "unknown location\n";
6363
}
64-
64+
6565
}
6666
else {
6767
echo "-- File is not created --\n";
@@ -100,12 +100,14 @@ File name is => %s/%s
100100
File permissions are => 100600
101101
File created in => directory specified
102102
-- Iteration 6 --
103-
File name is => %s/%s
104-
File permissions are => 100600
105-
File created in => directory specified
103+
104+
Warning: tempnam() expects parameter 2 to be a valid path, string given in %s on line %d
105+
-- File is not created --
106+
107+
Warning: unlink(): %s in %s on line %d
106108
-- Iteration 7 --
107109

108-
Warning: tempnam() expects parameter 2 to be string, array given in %s on line %d
110+
Warning: tempnam() expects parameter 2 to be a valid path, array given in %s on line %d
109111
-- File is not created --
110112

111113
Warning: unlink(): %s in %s on line %d

ext/standard/tests/general_functions/include_path.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var_dump(get_include_path());
4141

4242
echo "Done\n";
4343
?>
44-
--EXPECTF--
44+
--EXPECTF--
4545
string(1) "."
4646

4747
Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d
@@ -67,7 +67,7 @@ string(1) "."
6767
NULL
6868
string(1) "."
6969

70-
Warning: set_include_path() expects parameter 1 to be string, array given in %s on line %d
70+
Warning: set_include_path() expects parameter 1 to be a valid path, array given in %s on line %d
7171
NULL
7272
string(1) "."
7373
NULL

0 commit comments

Comments
 (0)