diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-20 05:24:24 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-11-20 05:24:24 +0000 |
commit | 4c587bdb01e6a7664780c53518a8cbe2858741b3 (patch) | |
tree | 2b8840f584861ad1cf95c2922bf976350c2e3662 | |
parent | b18a1f477830274e2487fd0564d795dbbf386eb7 (diff) |
Limit File_Structure_Test to only apply the regex expression if views is contained in the path name.
-rw-r--r-- | core/tests/File_Structure_Test.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/tests/File_Structure_Test.php b/core/tests/File_Structure_Test.php index 8af565bd..0ffa0f9f 100644 --- a/core/tests/File_Structure_Test.php +++ b/core/tests/File_Structure_Test.php @@ -39,9 +39,11 @@ class File_Structure_Test extends Unit_Test_Case { // Exception: this file must be named accordingly for the test framework continue; } - $this->assert_true( - preg_match("#/views/.*?(\.html|mrss)\.php$#", $file->getPathname()), - "{$file->getPathname()} should end in .html.php or mrss.php"); + if (strpos($file, "views")) { + $this->assert_true( + preg_match("#/views/.*?(\.html|mrss)\.php$#", $file->getPathname()), + "{$file->getPathname()} should end in .html.php or mrss.php"); + } } } |