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:
Ingo Schommer 2016-03-31 16:19:08 +13:00
commit 449a41a66a
3 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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'
));
}