diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-02 21:56:14 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-02 21:56:14 +0000 |
commit | 2f151cf39fa6716755a3a3e16e61cfa68da11a77 (patch) | |
tree | 07a6887f32f84021945a2a4a9dbda4329e36f5d6 | |
parent | a38752607e954ea47a93caadc8949eb6900fbc15 (diff) |
Ignore view files in no_trailing_closing_php_tag_test since they will occasionally
end in tags like <?= this ?>
-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 f4e04b39..a34c61b2 100644 --- a/core/tests/File_Structure_Test.php +++ b/core/tests/File_Structure_Test.php @@ -23,9 +23,11 @@ class File_Structure_Test extends Unit_Test_Case { new RecursiveIteratorIterator(new RecursiveDirectoryIterator(DOCROOT))); $incorrect = array(); foreach ($dir as $file) { - $this->assert_false( - preg_match('/\?\>\s*$/', file_get_contents($file)), - "{$file->getPathname()} ends in ?>"); + if (!preg_match("|\.html\.php$|", $file->getPathname())) { + $this->assert_false( + preg_match('/\?\>\s*$/', file_get_contents($file)), + "{$file->getPathname()} ends in ?>"); + } } } |