From a7e9be3bc46c12050fdf15d4f897a55bb3513dcc Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 6 Dec 2010 12:12:44 +1300 Subject: [PATCH] BUGFIX Fixing SecurityTest to clear any custom settings in Security::$force_database_is_ready before making assertions --- tests/security/SecurityTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/security/SecurityTest.php b/tests/security/SecurityTest.php index 1971fa064..7c94335cb 100644 --- a/tests/security/SecurityTest.php +++ b/tests/security/SecurityTest.php @@ -340,6 +340,9 @@ class SecurityTest extends FunctionalTest { } function testDatabaseIsReadyWithInsufficientMemberColumns() { + $old = Security::$force_database_is_ready; + Security::$force_database_is_ready = null; + // Assumption: The database has been built correctly by the test runner, // and has all columns present in the ORM DB::getConn()->renameField('Member', 'Email', 'Email_renamed'); @@ -350,6 +353,8 @@ class SecurityTest extends FunctionalTest { // Rebuild the database (which re-adds the Email column), and try again $this->resetDBSchema(true); $this->assertTrue(Security::database_is_ready()); + + Security::$force_database_is_ready = $old; } /**