File tree Expand file tree Collapse file tree 7 files changed +20
-20
lines changed
ext/phar/tests/buildFromIterator_user_overrides Expand file tree Collapse file tree 7 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class MyIterator extends RecursiveDirectoryIterator {
3737 }
3838}
3939
40- $ workdir = __DIR__ .'/001 ' ;
40+ $ workdir = __DIR__ .'/getMTime ' ;
4141mkdir ($ workdir . '/content ' , recursive: true );
4242file_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 ' );
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626 }
2727}
2828
29- $ workdir = __DIR__ .'/007 ' ;
29+ $ workdir = __DIR__ .'/getMTime_byRef ' ;
3030mkdir ($ workdir . '/content ' , recursive: true );
3131file_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 ' );
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class MyIterator extends RecursiveDirectoryIterator {
6161 }
6262}
6363
64- $ workdir = __DIR__ .'/002 ' ;
64+ $ workdir = __DIR__ .'/getMTime_errors ' ;
6565mkdir ($ workdir . '/content ' , recursive: true );
6666file_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
113113Previous: 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
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2727 }
2828}
2929
30- $ workdir = __DIR__ .'/004 ' ;
30+ $ workdir = __DIR__ .'/getPathname ' ;
3131mkdir ($ workdir . '/content ' , recursive: true );
3232file_put_contents ($ workdir . '/content/hello1.txt ' , "Hello world 1. " );
3333file_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 ' );
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626 }
2727}
2828
29- $ workdir = __DIR__ .'/005 ' ;
29+ $ workdir = __DIR__ .'/getPathname_byRef ' ;
3030mkdir ($ workdir . '/content ' , recursive: true );
3131file_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]
5858bool(true)
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626 }
2727}
2828
29- $ workdir = __DIR__ .'/003 ' ;
29+ $ workdir = __DIR__ .'/getPathname_exception ' ;
3030mkdir ($ workdir . '/content ' , recursive: true );
3131file_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 );
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class MyIterator extends RecursiveDirectoryIterator {
2626 }
2727}
2828
29- $ workdir = __DIR__ .'/006 ' ;
29+ $ workdir = __DIR__ .'/getPathname_wrong_type ' ;
3030mkdir ($ workdir . '/content ' , recursive: true );
3131file_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]
5858getPathname() must return a string
You can’t perform that action at this time.
0 commit comments