Skip to content

Commit 4124d40

Browse files
committed
Fix windows tests
1 parent a225d0c commit 4124d40

15 files changed

+99
-4
lines changed

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
1313

1414
function stat_fn( $filename ) {
1515
echo "\n-- File '$filename' --\n";
16+
$result = fileatime($filename);
1617
echo "-- File access time is => ";
17-
echo fileatime($filename)."\n";
18+
echo $result."\n";
1819
clearstatcache();
20+
$result = filemtime($filename);
1921
echo "-- File modification time is => ";
20-
echo filemtime($filename)."\n";
22+
echo $result."\n";
2123
clearstatcache();
24+
$result = filectime($filename);
2225
echo "-- inode change time is => ";
23-
echo filectime($filename)."\n";
26+
echo $result."\n";
2427
clearstatcache();
2528

2629

@@ -48,8 +51,14 @@ echo "Done";
4851

4952
*** testing file info ***
5053
-- File '' --
54+
55+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
5156
-- File access time is =>
57+
58+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
5259
-- File modification time is =>
60+
61+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
5362
-- inode change time is =>
5463

5564
-- File '' --
@@ -80,6 +89,8 @@ Warning: filectime(): stat failed for | in %s on line %d
8089

8190

8291
*** testing touch ***
92+
93+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
8394
bool(false)
8495
bool(false)
8596

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,14 @@ bool(false)
5151

5252
-- Filename: TRUE --
5353

54+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
55+
5456
Warning: file_get_contents(1): Failed to open stream: No such file or directory in %s on line %d
5557
bool(false)
5658

5759
-- Filename: FALSE --
60+
61+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
5862
ValueError: Path cannot be empty
5963

6064
-- Filename: "" --

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ foreach($names_arr as $key =>$value) {
5252
9 bytes written to: '-1'
5353

5454
-- Filename: TRUE --
55+
56+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
5557
9 bytes written to: '1'
5658

5759
-- Filename: FALSE --
60+
61+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
5862
ValueError: Path cannot be empty
5963

6064
-- Filename: "" --

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,18 +381,30 @@ array(0) {
381381
}
382382

383383
-- Iteration 12 --
384+
385+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
384386
array(0) {
385387
}
388+
389+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
386390
array(0) {
387391
}
392+
393+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
388394
array(0) {
389395
}
396+
397+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
390398
array(1) {
391399
[0]=>
392400
string(%d) "1"
393401
}
402+
403+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
394404
array(0) {
395405
}
406+
407+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
396408
array(0) {
397409
}
398410

@@ -446,6 +458,8 @@ array(1) {
446458
string(%d) "%s/glob_variation私はガラスを食べられます/wonder1"
447459
}
448460
-- Iteration 12 --
461+
462+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
449463
array(0) {
450464
}
451465
Done

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,18 +380,30 @@ array(0) {
380380
}
381381

382382
-- Iteration 12 --
383+
384+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
383385
array(0) {
384386
}
387+
388+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
385389
array(0) {
386390
}
391+
392+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
387393
array(0) {
388394
}
395+
396+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
389397
array(1) {
390398
[0]=>
391399
string(%d) "1"
392400
}
401+
402+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
393403
array(0) {
394404
}
405+
406+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
395407
array(0) {
396408
}
397409

@@ -445,6 +457,8 @@ array(1) {
445457
string(%d) "%s/glob_variation/wonder1"
446458
}
447459
-- Iteration 12 --
460+
461+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
448462
array(0) {
449463
}
450464
Done

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ Warning: readfile(-1): Failed to open stream: No such file or directory in %s on
4848

4949
-- Filename: TRUE --
5050

51+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
52+
5153
Warning: readfile(1): Failed to open stream: No such file or directory in %s on line %d
5254

5355
-- Filename: FALSE --
56+
57+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
5458
ValueError: Path cannot be empty
5559

5660
-- Filename: "" --

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,27 @@ bool(true)
6868
Warning: rename(-1,%safile.tmp): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d
6969
bool(false)
7070
-- 1 testing '1' boolean --
71+
72+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
7173
bool(true)
7274

75+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
76+
77+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
78+
7379
Warning: rename(1,%safile.tmp): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d
7480
bool(false)
7581
-- 2 testing '' boolean --
7682

83+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
84+
7785
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
7886
bool(false)
7987

88+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
89+
90+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
91+
8092
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
8193
bool(false)
8294
-- 3 testing '' string --

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ rmdir($file_path);
9191
-- Iteration 0 --
9292
OK
9393
-- Iteration 1 --
94+
95+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
9496
OK
9597
-- Iteration 2 --
98+
99+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
96100
OK
97101
-- Iteration 3 --
98102
OK

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ File permissions are => 100666
7272
File created in => temp dir
7373
-- Iteration 1 --
7474

75+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
76+
7577
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
7678
File name is => %s%et%s
7779
File permissions are => 100666
7880
File created in => temp dir
7981
-- Iteration 2 --
82+
83+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
8084
File name is => %s%et%s
8185
File permissions are => 100666
8286
File created in => temp dir

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ Warning: unlink(): %s in %s on line %d
5959
bool(false)
6060
bool(false)
6161

62+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
63+
6264
Warning: unlink(): %s in %s on line %d
6365
bool(false)
66+
67+
Deprecated: Implicit bool to string coercion is deprecated in %s on line %d
6468
bool(false)
6569

6670
-- Testing unlink() on non-existent file --

0 commit comments

Comments
 (0)