Skip to content

Commit

Permalink
BUG Prevent live manifest loading files from nested test directories
Browse files Browse the repository at this point in the history
E.g. framework/admin/tests
  • Loading branch information
Damian Mooyman committed Mar 31, 2016
1 parent 78892f0 commit e8a68c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions core/manifest/ManifestFileFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ public function acceptDir($basename, $pathname, $depth) {
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;
}

Expand Down
3 changes: 2 additions & 1 deletion tests/core/manifest/ManifestFileFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function testIgnoreTests() {

$this->assertFinderFinds($finder, array(
'module/module.txt',
'module/tests/tests.txt'
'module/tests/tests.txt',
'module/code/tests/tests2.txt'
));
}

Expand Down
Empty file.

0 comments on commit e8a68c4

Please sign in to comment.