diff --git a/core/manifest/ManifestFileFinder.php b/core/manifest/ManifestFileFinder.php index 27b3f447b..f19446dbd 100644 --- a/core/manifest/ManifestFileFinder.php +++ b/core/manifest/ManifestFileFinder.php @@ -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; } diff --git a/tests/core/manifest/ManifestFileFinderTest.php b/tests/core/manifest/ManifestFileFinderTest.php index a2bb716e9..45a93c844 100644 --- a/tests/core/manifest/ManifestFileFinderTest.php +++ b/tests/core/manifest/ManifestFileFinderTest.php @@ -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' )); } diff --git a/tests/core/manifest/fixtures/manifestfilefinder/module/code/tests/tests2.txt b/tests/core/manifest/fixtures/manifestfilefinder/module/code/tests/tests2.txt new file mode 100644 index 000000000..e69de29bb