@@ -482,35 +482,6 @@ public function testIgnoreVCSIgnoredUpToFirstGitRepositoryRoot()
482
482
]), $ finder ->in (self ::toAbsolute ('gitignore/git_root/search_root ' ))->getIterator ());
483
483
}
484
484
485
- /**
486
- * @runInSeparateProcess
487
- */
488
- public function testIgnoreVCSIgnoredWithOpenBasedir ()
489
- {
490
- if (\ini_get ('open_basedir ' )) {
491
- $ this ->markTestSkipped ('Cannot test when open_basedir is set ' );
492
- }
493
-
494
- $ finder = $ this ->buildFinder ();
495
- $ this ->assertSame (
496
- $ finder ,
497
- $ finder
498
- ->ignoreVCS (true )
499
- ->ignoreDotFiles (true )
500
- ->ignoreVCSIgnored (true )
501
- );
502
-
503
- $ this ->iniSet ('open_basedir ' , \dirname (__DIR__ , 5 ).\PATH_SEPARATOR .self ::toAbsolute ('gitignore/search_root ' ));
504
-
505
- $ this ->assertIterator (self ::toAbsolute ([
506
- 'gitignore/search_root/b.txt ' ,
507
- 'gitignore/search_root/c.txt ' ,
508
- 'gitignore/search_root/dir ' ,
509
- 'gitignore/search_root/dir/a.txt ' ,
510
- 'gitignore/search_root/dir/c.txt ' ,
511
- ]), $ finder ->in (self ::toAbsolute ('gitignore/search_root ' ))->getIterator ());
512
- }
513
-
514
485
public function testIgnoreVCSCanBeDisabledAfterFirstIteration ()
515
486
{
516
487
$ finder = $ this ->buildFinder ();
@@ -1056,6 +1027,7 @@ public function testIn()
1056
1027
self ::$ tmpDir .\DIRECTORY_SEPARATOR .'Zephire.php ' ,
1057
1028
self ::$ tmpDir .\DIRECTORY_SEPARATOR .'test.php ' ,
1058
1029
__DIR__ .\DIRECTORY_SEPARATOR .'GitignoreTest.php ' ,
1030
+ __DIR__ .\DIRECTORY_SEPARATOR .'FinderOpenBasedirTest.php ' ,
1059
1031
__DIR__ .\DIRECTORY_SEPARATOR .'FinderTest.php ' ,
1060
1032
__DIR__ .\DIRECTORY_SEPARATOR .'GlobTest.php ' ,
1061
1033
self ::$ tmpDir .\DIRECTORY_SEPARATOR .'qux_0_1.php ' ,
@@ -1624,13 +1596,4 @@ protected function buildFinder()
1624
1596
{
1625
1597
return Finder::create ()->exclude ('gitignore ' );
1626
1598
}
1627
-
1628
- protected function iniSet (string $ varName , string $ newValue ): void
1629
- {
1630
- if ('open_basedir ' === $ varName && $ deprecationsFile = getenv ('SYMFONY_DEPRECATIONS_SERIALIZE ' )) {
1631
- $ newValue .= \PATH_SEPARATOR .$ deprecationsFile ;
1632
- }
1633
-
1634
- parent ::iniSet ('open_basedir ' , $ newValue );
1635
- }
1636
1599
}
0 commit comments