From fc8cf562f5d7d4f0514512703f017f2979a6dea6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 19 Jan 2009 07:26:25 +0000 Subject: Fix up various little things to get File_Structure_Test to pass. --- core/tests/File_Structure_Test.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/tests') diff --git a/core/tests/File_Structure_Test.php b/core/tests/File_Structure_Test.php index 2c6bd239..e648192a 100644 --- a/core/tests/File_Structure_Test.php +++ b/core/tests/File_Structure_Test.php @@ -60,7 +60,9 @@ class File_Structure_Test extends Unit_Test_Case { $expected = $this->_get_preamble(__FILE__); foreach ($dir as $file) { - if (preg_match("/views/", $file->getPathname())) { + if (preg_match("/views/", $file->getPathname()) || + $file->getPathName() == DOCROOT . "installer/database_config.php" || + $file->getPathName() == DOCROOT . "installer/init_var.php") { // The preamble for views is a single line that prevents direct script access $lines = file($file->getPathname()); $this->assert_equal( @@ -70,8 +72,8 @@ class File_Structure_Test extends Unit_Test_Case { } else if (preg_match("|\.php$|", $file->getPathname())) { $actual = $this->_get_preamble($file->getPathname()); if ($file->getPathName() == DOCROOT . "index.php" || - $file->getPathName() == DOCROOT . "installer/install.php") { - // index.php and installer.php allow direct access, so modify our expectations for them + $file->getPathName() == DOCROOT . "installer/index.php") { + // index.php and installer/index.php allow direct access; modify our expectations for them $index_expected = $expected; $index_expected[0] = "assert_equal($index_expected, $actual, "in file: {$file->getPathname()}"); -- cgit v1.2.3