diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-01 18:45:25 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-01 18:45:25 +0000 |
commit | a7f22994ed0298ed051235e90bb581703956ba30 (patch) | |
tree | fa39322863208aaa80d43fc0ee5cca393c6dfb99 /core/tests/File_Structure_Test.php | |
parent | 60fbea6fd000569210641588888c010b50c9c8e6 (diff) |
Add a new test to verify that view files end in .html.php
Diffstat (limited to 'core/tests/File_Structure_Test.php')
-rw-r--r-- | core/tests/File_Structure_Test.php | 14 |
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 { |