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)

0 commit comments

Comments
 (0)