Skip to content

Commit 8752a73

Browse files
committed
Test improvements
1 parent 6d45bc5 commit 8752a73

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

ext/phar/tests/buildFromIterator_user_overrides/getMTime.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MyIterator extends RecursiveDirectoryIterator {
3737
}
3838
}
3939

40-
$workdir = __DIR__.'/001';
40+
$workdir = __DIR__.'/getMTime';
4141
mkdir($workdir . '/content', recursive: true);
4242
file_put_contents($workdir . '/content/hello.txt', "Hello world.");
4343

@@ -61,7 +61,7 @@ var_dump($result['content/hello.txt']->getCTime());
6161
?>
6262
--CLEAN--
6363
<?php
64-
$workdir = __DIR__.'/001';
64+
$workdir = __DIR__.'/getMTime';
6565
@unlink($workdir . '/test.phar');
6666
@unlink($workdir . '/content/hello.txt');
6767
@rmdir($workdir . '/content');

ext/phar/tests/buildFromIterator_user_overrides/getMTime_byRef.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626
}
2727
}
2828

29-
$workdir = __DIR__.'/007';
29+
$workdir = __DIR__.'/getMTime_byRef';
3030
mkdir($workdir . '/content', recursive: true);
3131
file_put_contents($workdir . '/content/hello.txt', "Hello world.");
3232

@@ -50,7 +50,7 @@ var_dump($result['content/hello.txt']->getCTime());
5050
?>
5151
--CLEAN--
5252
<?php
53-
$workdir = __DIR__.'/007';
53+
$workdir = __DIR__.'/getMTime_byRef';
5454
@unlink($workdir . '/test.phar');
5555
@unlink($workdir . '/content/hello.txt');
5656
@rmdir($workdir . '/content');

ext/phar/tests/buildFromIterator_user_overrides/getMTime_errors.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class MyIterator extends RecursiveDirectoryIterator {
6161
}
6262
}
6363

64-
$workdir = __DIR__.'/002';
64+
$workdir = __DIR__.'/getMTime_errors';
6565
mkdir($workdir . '/content', recursive: true);
6666
file_put_contents($workdir . '/content/hello.txt', "Hello world.");
6767

@@ -88,7 +88,7 @@ for ($i = 0; $i < 4; $i++) {
8888
?>
8989
--CLEAN--
9090
<?php
91-
$workdir = __DIR__.'/002';
91+
$workdir = __DIR__.'/getMTime_errors';
9292
@unlink($workdir . '/content/hello.txt');
9393
@unlink($workdir . '/test3.phar');
9494
@unlink($workdir . '/test2.phar');
@@ -105,13 +105,13 @@ Entry content%chello.txt cannot be created: timestamp is limited to 32-bit
105105
--- Iteration 1 ---
106106
[ Found: %shello.txt ]
107107
[MTime]
108-
Entry content/hello.txt cannot be created: getMTime() must return an int
108+
Entry content%chello.txt cannot be created: getMTime() must return an int
109109
--- Iteration 2 ---
110110
[ Found: %shello.txt ]
111111
[MTime]
112-
Entry content/hello.txt cannot be created: getMTime() must return an int
112+
Entry content%chello.txt cannot be created: getMTime() must return an int
113113
Previous: Throwing an exception inside getMTime()
114114
--- Iteration 3 ---
115-
[ Found: %scontent/hello.txt ]
115+
[ Found: %shello.txt ]
116116
[MTime]
117-
Entry content/hello.txt cannot be created: getMTime() must return an int
117+
Entry content%chello.txt cannot be created: getMTime() must return an int

ext/phar/tests/buildFromIterator_user_overrides/getPathname.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2727
}
2828
}
2929

30-
$workdir = __DIR__.'/004';
30+
$workdir = __DIR__.'/getPathname';
3131
mkdir($workdir . '/content', recursive: true);
3232
file_put_contents($workdir . '/content/hello1.txt', "Hello world 1.");
3333
file_put_contents($workdir . '/content/hello2.txt', "Hello world 2.");
@@ -49,7 +49,7 @@ var_dump(isset($result['content/hello2.txt']));
4949
?>
5050
--CLEAN--
5151
<?php
52-
$workdir = __DIR__.'/004';
52+
$workdir = __DIR__.'/getPathname';
5353
@unlink($workdir . '/test.phar');
5454
@unlink($workdir . '/content/hello1.txt');
5555
@unlink($workdir . '/content/hello2.txt');

ext/phar/tests/buildFromIterator_user_overrides/getPathname_byRef.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626
}
2727
}
2828

29-
$workdir = __DIR__.'/005';
29+
$workdir = __DIR__.'/getPathname_byRef';
3030
mkdir($workdir . '/content', recursive: true);
3131
file_put_contents($workdir . '/content/hello.txt', "Hello world 1.");
3232

@@ -46,13 +46,13 @@ var_dump(isset($result['content/hello.txt']));
4646
?>
4747
--CLEAN--
4848
<?php
49-
$workdir = __DIR__.'/005';
49+
$workdir = __DIR__.'/getPathname_byRef';
5050
@unlink($workdir . '/test.phar');
5151
@unlink($workdir . '/content/hello.txt');
5252
@rmdir($workdir . '/content');
5353
@rmdir($workdir);
5454
?>
5555
--EXPECTF--
56-
[ Found: %scontent/hello.txt ]
56+
[ Found: %scontent%chello.txt ]
5757
[getPathname]
5858
bool(true)

ext/phar/tests/buildFromIterator_user_overrides/getPathname_exception.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626
}
2727
}
2828

29-
$workdir = __DIR__.'/003';
29+
$workdir = __DIR__.'/getPathname_exception';
3030
mkdir($workdir . '/content', recursive: true);
3131
file_put_contents($workdir . '/content/hello.txt', "Hello world.");
3232

@@ -50,7 +50,7 @@ $phar->stopBuffering();
5050
?>
5151
--CLEAN--
5252
<?php
53-
$workdir = __DIR__.'/003';
53+
$workdir = __DIR__.'/getPathname_exception';
5454
@unlink($workdir . '/content/hello.txt');
5555
@rmdir($workdir . '/content');
5656
@rmdir($workdir);

ext/phar/tests/buildFromIterator_user_overrides/getPathname_wrong_type.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626
}
2727
}
2828

29-
$workdir = __DIR__.'/006';
29+
$workdir = __DIR__.'/getPathname_wrong_type';
3030
mkdir($workdir . '/content', recursive: true);
3131
file_put_contents($workdir . '/content/hello.txt', "Hello world.");
3232

@@ -47,12 +47,12 @@ $phar->stopBuffering();
4747
?>
4848
--CLEAN--
4949
<?php
50-
$workdir = __DIR__.'/006';
50+
$workdir = __DIR__.'/getPathname_wrong_type';
5151
@unlink($workdir . '/content/hello.txt');
5252
@rmdir($workdir . '/content');
5353
@rmdir($workdir);
5454
?>
5555
--EXPECTF--
56-
[ Found: %scontent/hello.txt ]
56+
[ Found: %scontent%chello.txt ]
5757
[getPathname]
5858
getPathname() must return a string

0 commit comments

Comments
 (0)