@@ -57,13 +57,13 @@ public function testFiles($adapter)
57
57
{
58
58
$ finder = $ this ->buildFinder ($ adapter );
59
59
$ this ->assertSame ($ finder , $ finder ->files ());
60
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'test.py ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
60
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'test.py ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
61
61
62
62
$ finder = $ this ->buildFinder ($ adapter );
63
63
$ finder ->files ();
64
64
$ finder ->directories ();
65
65
$ finder ->files ();
66
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'test.py ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
66
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'test.py ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
67
67
}
68
68
69
69
/**
@@ -73,11 +73,11 @@ public function testDepth($adapter)
73
73
{
74
74
$ finder = $ this ->buildFinder ($ adapter );
75
75
$ this ->assertSame ($ finder , $ finder ->depth ('< 1 ' ));
76
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
76
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'test.php ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
77
77
78
78
$ finder = $ this ->buildFinder ($ adapter );
79
79
$ this ->assertSame ($ finder , $ finder ->depth ('<= 0 ' ));
80
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
80
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'test.php ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
81
81
82
82
$ finder = $ this ->buildFinder ($ adapter );
83
83
$ this ->assertSame ($ finder , $ finder ->depth ('>= 1 ' ));
@@ -118,12 +118,12 @@ public function testNotName($adapter)
118
118
{
119
119
$ finder = $ this ->buildFinder ($ adapter );
120
120
$ this ->assertSame ($ finder , $ finder ->notName ('*.php ' ));
121
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
121
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
122
122
123
123
$ finder = $ this ->buildFinder ($ adapter );
124
124
$ finder ->notName ('*.php ' );
125
125
$ finder ->notName ('*.py ' );
126
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
126
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
127
127
128
128
$ finder = $ this ->buildFinder ($ adapter );
129
129
$ finder ->name ('test.ph* ' );
@@ -172,7 +172,7 @@ public function testExclude($adapter)
172
172
{
173
173
$ finder = $ this ->buildFinder ($ adapter );
174
174
$ this ->assertSame ($ finder , $ finder ->exclude ('foo ' ));
175
- $ this ->assertIterator ($ this ->toAbsolute (array ('test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
175
+ $ this ->assertIterator ($ this ->toAbsolute (array ('test.php ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
176
176
}
177
177
178
178
/**
@@ -182,15 +182,15 @@ public function testIgnoreVCS($adapter)
182
182
{
183
183
$ finder = $ this ->buildFinder ($ adapter );
184
184
$ this ->assertSame ($ finder , $ finder ->ignoreVCS (false )->ignoreDotFiles (false ));
185
- $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
185
+ $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
186
186
187
187
$ finder = $ this ->buildFinder ($ adapter );
188
188
$ finder ->ignoreVCS (false )->ignoreVCS (false )->ignoreDotFiles (false );
189
- $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
189
+ $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
190
190
191
191
$ finder = $ this ->buildFinder ($ adapter );
192
192
$ this ->assertSame ($ finder , $ finder ->ignoreVCS (true )->ignoreDotFiles (false ));
193
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
193
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
194
194
}
195
195
196
196
/**
@@ -200,15 +200,15 @@ public function testIgnoreDotFiles($adapter)
200
200
{
201
201
$ finder = $ this ->buildFinder ($ adapter );
202
202
$ this ->assertSame ($ finder , $ finder ->ignoreDotFiles (false )->ignoreVCS (false ));
203
- $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , '.bar ' , '.foo ' , '.foo/.bar ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
203
+ $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , '.bar ' , '.foo ' , '.foo/.bar ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
204
204
205
205
$ finder = new Finder ();
206
206
$ finder ->ignoreDotFiles (false )->ignoreDotFiles (false )->ignoreVCS (false );
207
- $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , '.bar ' , '.foo ' , '.foo/.bar ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
207
+ $ this ->assertIterator ($ this ->toAbsolute (array ('.git ' , '.bar ' , '.foo ' , '.foo/.bar ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
208
208
209
209
$ finder = $ this ->buildFinder ($ adapter );
210
210
$ this ->assertSame ($ finder , $ finder ->ignoreDotFiles (true )->ignoreVCS (false ));
211
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
211
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
212
212
213
213
}
214
214
@@ -219,7 +219,7 @@ public function testSortByName($adapter)
219
219
{
220
220
$ finder = $ this ->buildFinder ($ adapter );
221
221
$ this ->assertSame ($ finder , $ finder ->sortByName ());
222
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
222
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo bar ' , ' foo /bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
223
223
}
224
224
225
225
/**
@@ -229,7 +229,7 @@ public function testSortByType($adapter)
229
229
{
230
230
$ finder = $ this ->buildFinder ($ adapter );
231
231
$ this ->assertSame ($ finder , $ finder ->sortByType ());
232
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'toto ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
232
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo bar ' , ' toto ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
233
233
}
234
234
235
235
/**
@@ -239,7 +239,7 @@ public function testSortByAccessedTime($adapter)
239
239
{
240
240
$ finder = $ this ->buildFinder ($ adapter );
241
241
$ this ->assertSame ($ finder , $ finder ->sortByAccessedTime ());
242
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'toto ' , 'test.py ' , 'foo ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
242
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'toto ' , 'test.py ' , 'foo ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
243
243
}
244
244
245
245
/**
@@ -249,7 +249,7 @@ public function testSortByChangedTime($adapter)
249
249
{
250
250
$ finder = $ this ->buildFinder ($ adapter );
251
251
$ this ->assertSame ($ finder , $ finder ->sortByChangedTime ());
252
- $ this ->assertIterator ($ this ->toAbsolute (array ('toto ' , 'test.py ' , 'test.php ' , 'foo/bar.tmp ' , 'foo ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
252
+ $ this ->assertIterator ($ this ->toAbsolute (array ('toto ' , 'test.py ' , 'test.php ' , 'foo/bar.tmp ' , 'foo ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
253
253
}
254
254
255
255
/**
@@ -259,7 +259,7 @@ public function testSortByModifiedTime($adapter)
259
259
{
260
260
$ finder = $ this ->buildFinder ($ adapter );
261
261
$ this ->assertSame ($ finder , $ finder ->sortByModifiedTime ());
262
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'toto ' , 'test.py ' , 'foo ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
262
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo/bar.tmp ' , 'test.php ' , 'toto ' , 'test.py ' , 'foo ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
263
263
}
264
264
265
265
/**
@@ -269,7 +269,7 @@ public function testSort($adapter)
269
269
{
270
270
$ finder = $ this ->buildFinder ($ adapter );
271
271
$ this ->assertSame ($ finder , $ finder ->sort (function (\SplFileInfo $ a , \SplFileInfo $ b ) { return strcmp ($ a ->getRealpath (), $ b ->getRealpath ()); }));
272
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
272
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo bar ' , ' foo /bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
273
273
}
274
274
275
275
/**
@@ -293,7 +293,7 @@ public function testFollowLinks($adapter)
293
293
294
294
$ finder = $ this ->buildFinder ($ adapter );
295
295
$ this ->assertSame ($ finder , $ finder ->followLinks ());
296
- $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
296
+ $ this ->assertIterator ($ this ->toAbsolute (array ('foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , ' foo bar ' )), $ finder ->in (self ::$ tmpDir )->getIterator ());
297
297
}
298
298
299
299
/**
@@ -366,7 +366,7 @@ public function testRelativePath($adapter)
366
366
$ paths [] = $ file ->getRelativePath ();
367
367
}
368
368
369
- $ ref = array ("" , "" , "" , "" , "foo " );
369
+ $ ref = array ("" , "" , "" , "" , "foo " , "" );
370
370
371
371
sort ($ ref );
372
372
sort ($ paths );
@@ -389,7 +389,7 @@ public function testRelativePathname($adapter)
389
389
$ paths [] = $ file ->getRelativePathname ();
390
390
}
391
391
392
- $ ref = array ("test.php " , "toto " , "test.py " , "foo " , "foo " .DIRECTORY_SEPARATOR ."bar.tmp " );
392
+ $ ref = array ("test.php " , "toto " , "test.py " , "foo " , "foo " .DIRECTORY_SEPARATOR ."bar.tmp " , " foo bar " );
393
393
394
394
sort ($ paths );
395
395
sort ($ ref );
0 commit comments