From 9c5df1d31bd214fab051b71d092c751a1da20ecc Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 21 Dec 2009 19:59:44 -0800 Subject: Fix preambles, and fix the File_Structure_Test to be more lenient because of preamble variation in K24. --- modules/gallery/tests/File_Structure_Test.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'modules/gallery/tests/File_Structure_Test.php') diff --git a/modules/gallery/tests/File_Structure_Test.php b/modules/gallery/tests/File_Structure_Test.php index 36342fda..a046b4dd 100644 --- a/modules/gallery/tests/File_Structure_Test.php +++ b/modules/gallery/tests/File_Structure_Test.php @@ -57,10 +57,12 @@ class File_Structure_Test extends Unit_Test_Case { } private function _check_view_preamble($path, &$errors) { + $expected_2 = null; // The preamble for views is a single line that prevents direct script access if (strpos($path, SYSPATH) === 0) { // Kohana preamble $expected = "\n"; + $expected_2 = " Date: Sat, 2 Jan 2010 14:47:59 -0800 Subject: Ignore modules/gallery/views/kohana/error.php -- we're required to have that name by Kohana_404_Exception. --- modules/gallery/tests/File_Structure_Test.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gallery/tests/File_Structure_Test.php') diff --git a/modules/gallery/tests/File_Structure_Test.php b/modules/gallery/tests/File_Structure_Test.php index a046b4dd..b5026188 100644 --- a/modules/gallery/tests/File_Structure_Test.php +++ b/modules/gallery/tests/File_Structure_Test.php @@ -36,6 +36,10 @@ class File_Structure_Test extends Unit_Test_Case { $dir = new GalleryCodeFilterIterator( new RecursiveIteratorIterator(new RecursiveDirectoryIterator(DOCROOT))); foreach ($dir as $file) { + if (strpos($file, "modules/gallery/views/kohana/error.php")) { + continue; + } + if (strpos($file, "views")) { $this->assert_true( preg_match("#/views/.*?(\.html|mrss|txt)\.php$#", $file->getPathname()), -- cgit v1.2.3