BUGFIX Fixing SecurityTest to clear any custom settings in Security::$force_database_is_ready before making assertions

This commit is contained in:
Ingo Schommer 2010-12-06 12:12:44 +13:00
parent 5755c27c30
commit a7e9be3bc4

View File

@ -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;
}
/**