BUG Prevent live manifest loading files from nested test directories

E.g. framework/admin/tests
This commit is contained in:
Damian Mooyman 2016-03-31 15:58:23 +13:00
parent 78892f0a8d
commit e8a68c42ce
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'
));
}