summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-01 18:45:25 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-01 18:45:25 +0000
commita7f22994ed0298ed051235e90bb581703956ba30 (patch)
treefa39322863208aaa80d43fc0ee5cca393c6dfb99
parent60fbea6fd000569210641588888c010b50c9c8e6 (diff)
Add a new test to verify that view files end in .html.php
-rw-r--r--core/tests/File_Structure_Test.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/tests/File_Structure_Test.php b/core/tests/File_Structure_Test.php
index d0749062..23d6acbb 100644
--- a/core/tests/File_Structure_Test.php
+++ b/core/tests/File_Structure_Test.php
@@ -28,6 +28,20 @@ class File_Structure_Test extends Unit_Test_Case {
}
}
}
+
+ public function view_files_end_in_html_dot_php_test() {
+ $dir = new GalleryCodeFilterIterator(
+ new RecursiveIteratorIterator(new RecursiveDirectoryIterator(DOCROOT)));
+ foreach ($dir as $file) {
+ if ($file->getFilename() == 'kohana_unit_test.php') {
+ // Exception, this file must be named accordingly for the test framework
+ continue;
+ }
+ if (preg_match("|/views\b|", $file->getPath())) {
+ $this->assert_equal(".html.php", substr($file->getPathname(), -9), $file->getPathname());
+ }
+ }
+ }
}
class GalleryCodeFilterIterator extends FilterIterator {