Skip to content

Commit ce04773

Browse files
committed
Some windows test fixes
1 parent a7a354e commit ce04773

18 files changed

+23
-107
lines changed

ext/odbc/tests/odbc_columnprivileges_001.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ var_dump(odbc_fetch_row($result));
2222
--EXPECTF--
2323
resource(%d) of type (odbc result)
2424
bool(false)
25+
26+
Deprecated: odbc_columnprivileges(): Passing null to parameter #3 ($schema) of type string is deprecated in %s on line %d
27+
28+
Deprecated: odbc_columnprivileges(): Passing null to parameter #4 ($table) of type string is deprecated in %s on line %d
29+
30+
Deprecated: odbc_columnprivileges(): Passing null to parameter #5 ($column) of type string is deprecated in %s on line %d
2531
resource(%d) of type (odbc result)
2632
bool(false)
2733
resource(%d) of type (odbc result)

ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ if (!extension_loaded('sockets')) {
1111
--FILE--
1212
<?php
1313

14-
var_dump(socket_create_pair(AF_INET, null, null, $sockets));
14+
var_dump(socket_create_pair(AF_INET, 0, 0, $sockets));
1515

1616
try {
17-
var_dump(socket_create_pair(31337, null, null, $sockets));
17+
var_dump(socket_create_pair(31337, 0, 0, $sockets));
1818
} catch (\ValueError $e) {
1919
echo $e->getMessage() . \PHP_EOL;
2020
}

ext/standard/tests/file/005_variation2-win32.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function stat_fn( $filename ) {
2828

2929
echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
3030
echo "\n*** testing file info ***";
31-
stat_fn(NULL);
3231
stat_fn(false);
3332
stat_fn('');
3433
stat_fn(' ');
@@ -59,11 +58,6 @@ echo "Done";
5958
-- File modification time is =>
6059
-- inode change time is =>
6160

62-
-- File '' --
63-
-- File access time is =>
64-
-- File modification time is =>
65-
-- inode change time is =>
66-
6761
-- File ' ' --
6862
-- File access time is =>
6963
Warning: fileatime(): stat failed for in %s on line %d

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,11 @@ $file_path_variations = array (
5656
/* paths with shortcut home dir char, with suffix variation */
5757
array("C:\\temp\\bar"),
5858
array("C:\\temp\\bar", ""),
59-
array("C:\\temp\\bar", NULL),
6059
array("C:\\temp\\bar", ' '),
6160
array("C:\\temp\\bar.tar", ".tar"),
6261
array("C:\\temp\\bar.tar", "~"),
6362
array("C:\\temp\\bar.tar\\", "~"),
6463
array("C:\\temp\\bar.tar\\", ""),
65-
array("C:\\temp\\bar.tar", NULL),
6664
array("C:\\temp\\bar.tar", ''),
6765
array("C:\\temp\\bar.tar", " "),
6866

@@ -84,7 +82,6 @@ $file_path_variations = array (
8482
array("\\bar.zip\\", "\\bar.zip\\"),
8583
array(" ", " "),
8684
array(' ', ' '),
87-
array(NULL, NULL),
8885

8986
/* path with spaces */
9087
array(" "),
@@ -93,7 +90,6 @@ $file_path_variations = array (
9390
/* empty paths */
9491
array(""),
9592
array(''),
96-
array(NULL)
9793
);
9894

9995
function check_basename( $path_arrays ) {
@@ -288,7 +284,4 @@ string(0) ""
288284

289285
--Iteration 31--
290286
string(0) ""
291-
292-
--Iteration 32--
293-
string(0) ""
294287
Done

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ $file_paths = array (
5656
/* empty paths */
5757
"",
5858
'',
59-
NULL,
6059
);
6160

6261
foreach ($file_paths as $file_path) {
@@ -98,4 +97,3 @@ string(1) " "
9897
string(1) " "
9998
string(0) ""
10099
string(0) ""
101-
string(0) ""

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ $names_arr = array(
2020
"-1" => -1,
2121
"TRUE" => TRUE,
2222
"FALSE" => FALSE,
23-
"NULL" => NULL,
2423
"\"\"" => "",
2524
"\" \"" => " ",
2625
"\\0" => "\0",
@@ -58,9 +57,6 @@ bool(false)
5857
-- Filename: FALSE --
5958
ValueError: Path cannot be empty
6059

61-
-- Filename: NULL --
62-
ValueError: Path cannot be empty
63-
6460
-- Filename: "" --
6561
ValueError: Path cannot be empty
6662

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ $names_arr = array(
1818
"-1" => -1,
1919
"TRUE" => TRUE,
2020
"FALSE" => FALSE,
21-
"NULL" => NULL,
2221
"\"\"" => "",
2322
"\" \"" => " ",
2423
"\\0" => "\0",
@@ -58,9 +57,6 @@ foreach($names_arr as $key =>$value) {
5857
-- Filename: FALSE --
5958
ValueError: Path cannot be empty
6059

61-
-- Filename: NULL --
62-
ValueError: Path cannot be empty
63-
6460
-- Filename: "" --
6561
ValueError: Path cannot be empty
6662

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ $names_arr = array(
1919
"-1" => -1,
2020
"TRUE" => TRUE,
2121
"FALSE" => FALSE,
22-
"NULL" => NULL,
2322
"\"\"" => "",
2423
"\" \"" => " ",
2524
"\\0" => "\0",
@@ -54,9 +53,6 @@ Warning: readfile(1): Failed to open stream: No such file or directory in %s on
5453
-- Filename: FALSE --
5554
ValueError: Path cannot be empty
5655

57-
-- Filename: NULL --
58-
ValueError: Path cannot be empty
59-
6056
-- Filename: "" --
6157
ValueError: Path cannot be empty
6258

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ $file_string = array (
5151
/* empty filename */
5252
"",
5353
'',
54-
NULL,
55-
null
5654
);
5755
for($loop_counter = 0; $loop_counter < count($file_string); $loop_counter++) {
5856
echo "-- Iteration";
@@ -91,8 +89,4 @@ bool(false)
9189
string(%d) "%s"
9290
-- Iteration4 --
9391
string(%d) "%s"
94-
-- Iteration5 --
95-
string(%d) "%s"
96-
-- Iteration6 --
97-
string(%d) "%s"
9892
Done

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ $names_arr = array(
1717
-1, /* -1 is just a valid filename on windows */
1818
TRUE, /* 1 as well, (string)TRUE > "1" */
1919
FALSE,
20-
NULL,
2120
"", // I think both p8 and php are wrong on the messages here
2221
//p8 generates different messages to php, php is probably wrong
2322
//php has either "File Exists" or "Permission Denied".
@@ -80,35 +79,28 @@ bool(false)
8079

8180
Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
8281
bool(false)
83-
-- 3 testing '' NULL --
82+
-- 3 testing '' string --
8483

8584
Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
8685
bool(false)
8786

8887
Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
8988
bool(false)
90-
-- 4 testing '' string --
91-
92-
Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
93-
bool(false)
94-
95-
Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
96-
bool(false)
97-
-- 5 testing ' ' string --
89+
-- 4 testing ' ' string --
9890

9991
Warning: rename(%s): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d
10092
bool(false)
10193

10294
Warning: rename(%s): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d
10395
bool(false)
104-
-- 6 testing '/no/such/file/dir' string --
96+
-- 5 testing '/no/such/file/dir' string --
10597

10698
Warning: rename(%safile.tmp,/no/such/file/dir): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
10799
bool(false)
108100

109101
Warning: rename(/no/such/file/dir,%safile.tmp): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
110102
bool(false)
111-
-- 7 testing 'php/php' string --
103+
-- 6 testing 'php/php' string --
112104

113105
Warning: rename(%safile.tmp,php/php): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
114106
bool(false)

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ $names_arr = array(
2626
-1,
2727
TRUE,
2828
FALSE,
29-
NULL,
3029
"",
3130
" ",
3231
"\0",
@@ -47,7 +46,6 @@ $res_arr = array(
4746
true,
4847
true,
4948
true,
50-
true,
5149
false,
5250

5351
/* prefix with path separator of a non existing directory*/
@@ -99,17 +97,15 @@ OK
9997
-- Iteration 3 --
10098
OK
10199
-- Iteration 4 --
102-
OK
103-
-- Iteration 5 --
104100

105101
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation3-win32.php on line %d
106102
Failed, not created in the correct directory %s vs %s
107103
0
108-
-- Iteration 6 --
104+
-- Iteration 5 --
109105
tempnam(): Argument #2 ($prefix) must not contain any null bytes
110-
-- Iteration 7 --
106+
-- Iteration 6 --
111107
tempnam(): Argument #2 ($prefix) must be of type string, array given
112-
-- Iteration 8 --
108+
-- Iteration 7 --
113109
OK
114-
-- Iteration 9 --
110+
-- Iteration 8 --
115111
OK

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ $names_arr = array(
1919
-1,
2020
TRUE,
2121
FALSE,
22-
NULL,
2322
"",
2423
" ",
2524
"\0",
@@ -86,26 +85,22 @@ File name is => %s%et%s
8685
File permissions are => 100666
8786
File created in => temp dir
8887
-- Iteration 4 --
89-
File name is => %s%et%s
90-
File permissions are => 100666
91-
File created in => temp dir
92-
-- Iteration 5 --
9388

9489
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
9590
File name is => %s%et%s
9691
File permissions are => 100666
9792
File created in => temp dir
98-
-- Iteration 6 --
93+
-- Iteration 5 --
9994
tempnam(): Argument #1 ($directory) must not contain any null bytes
100-
-- Iteration 7 --
95+
-- Iteration 6 --
10196
tempnam(): Argument #1 ($directory) must be of type string, array given
102-
-- Iteration 8 --
97+
-- Iteration 7 --
10398

10499
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
105100
File name is => %s%et%s
106101
File permissions are => 100666
107102
File created in => temp dir
108-
-- Iteration 9 --
103+
-- Iteration 8 --
109104

110105
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
111106
File name is => %s%et%s

ext/standard/tests/file/unlink_error-win32-mb.phpt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
2727
var_dump( unlink('') ); // $filename as empty string
2828
var_dump( file_exists('') ); // confirm file doesn't exist
2929

30-
var_dump( unlink(NULL) ); // $filename as NULL
31-
var_dump( file_exists(NULL) ); // confirm file doesn't exist
32-
3330
var_dump( unlink(false) ); // $filename as boolean false
3431
var_dump( file_exists(false) ); // confirm file doesn't exist
3532

@@ -66,10 +63,6 @@ Warning: unlink(): %s in %s on line %d
6663
bool(false)
6764
bool(false)
6865

69-
Warning: unlink(): %s in %s on line %d
70-
bool(false)
71-
bool(false)
72-
7366
-- Testing unlink() on non-existent file --
7467

7568
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
2525
var_dump( unlink('') ); // $filename as empty string
2626
var_dump( file_exists('') ); // confirm file doesn't exist
2727

28-
var_dump( unlink(NULL) ); // $filename as NULL
29-
var_dump( file_exists(NULL) ); // confirm file doesn't exist
30-
3128
var_dump( unlink(false) ); // $filename as boolean false
3229
var_dump( file_exists(false) ); // confirm file doesn't exist
3330

@@ -63,10 +60,6 @@ Warning: unlink(): %s in %s on line %d
6360
bool(false)
6461
bool(false)
6562

66-
Warning: unlink(): %s in %s on line %d
67-
bool(false)
68-
bool(false)
69-
7063
-- Testing unlink() on non-existent file --
7164

7265
Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d

ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $d = $base . '\\dev\\http\\tproj\\app\\cache\\dev_old\\annotations\\72';
1717
$foo = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b.doctrinecache.data';
1818
$bar = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b315d.doctrinecache.data';
1919

20-
mkdir($d, NULL, true);
20+
mkdir($d, 0777, true);
2121

2222
foreach (array($foo, $bar) as $f) {
2323
touch($f);

0 commit comments

Comments
 (0)