@@ -199,6 +199,18 @@ public function testIgnoreVCS()
199
199
$ this ->assertIterator ($ this ->toAbsolute (['foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' , '.foo/bar ' , 'foo bar ' ]), $ finder ->in (self ::$ tmpDir )->getIterator ());
200
200
}
201
201
202
+ public function testIgnoreVCSCanBeDisabledAfterFirstIteration ()
203
+ {
204
+ $ finder = $ this ->buildFinder ();
205
+ $ finder ->in (self ::$ tmpDir );
206
+ $ finder ->ignoreDotFiles (false );
207
+
208
+ $ this ->assertIterator ($ this ->toAbsolute (['foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' , '.foo/bar ' , 'foo bar ' ]), $ finder ->getIterator ());
209
+
210
+ $ finder ->ignoreVCS (false );
211
+ $ this ->assertIterator ($ this ->toAbsolute (['.git ' , 'foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , 'toto/.git ' , '.bar ' , '.foo ' , '.foo/.bar ' , '.foo/bar ' , 'foo bar ' ]), $ finder ->getIterator ());
212
+ }
213
+
202
214
public function testIgnoreDotFiles ()
203
215
{
204
216
$ finder = $ this ->buildFinder ();
@@ -214,6 +226,17 @@ public function testIgnoreDotFiles()
214
226
$ this ->assertIterator ($ this ->toAbsolute (['foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , 'foo bar ' ]), $ finder ->in (self ::$ tmpDir )->getIterator ());
215
227
}
216
228
229
+ public function testIgnoreDotFilesCanBeDisabledAfterFirstIteration ()
230
+ {
231
+ $ finder = $ this ->buildFinder ();
232
+ $ finder ->in (self ::$ tmpDir );
233
+
234
+ $ this ->assertIterator ($ this ->toAbsolute (['foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , 'foo bar ' ]), $ finder ->getIterator ());
235
+
236
+ $ finder ->ignoreDotFiles (false );
237
+ $ this ->assertIterator ($ this ->toAbsolute (['foo ' , 'foo/bar.tmp ' , 'test.php ' , 'test.py ' , 'toto ' , '.bar ' , '.foo ' , '.foo/.bar ' , '.foo/bar ' , 'foo bar ' ]), $ finder ->getIterator ());
238
+ }
239
+
217
240
public function testSortByName ()
218
241
{
219
242
$ finder = $ this ->buildFinder ();
0 commit comments