mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5254 from tractorcow/pulls/4.0/ignore-tests
BUG Prevent live manifest loading files from nested test directories
This commit is contained in:
commit
449a41a66a
@ -37,9 +37,8 @@ class ManifestFileFinder extends SS_FileFinder {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we're not in testing mode, then skip over the tests directory in
|
||||
// the module root.
|
||||
if ($this->getOption('ignore_tests') && $depth == 2 && $basename == self::TESTS_DIR) {
|
||||
// If we're not in testing mode, then skip over any tests directories.
|
||||
if ($this->getOption('ignore_tests') && $basename == self::TESTS_DIR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,8 @@ class ManifestFileFinderTest extends SapphireTest {
|
||||
|
||||
$this->assertFinderFinds($finder, array(
|
||||
'module/module.txt',
|
||||
'module/tests/tests.txt'
|
||||
'module/tests/tests.txt',
|
||||
'module/code/tests/tests2.txt'
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user