mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Fixing SecurityTest to clear any custom settings in Security::$force_database_is_ready before making assertions
This commit is contained in:
parent
5755c27c30
commit
a7e9be3bc4
@ -340,6 +340,9 @@ class SecurityTest extends FunctionalTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testDatabaseIsReadyWithInsufficientMemberColumns() {
|
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,
|
// Assumption: The database has been built correctly by the test runner,
|
||||||
// and has all columns present in the ORM
|
// and has all columns present in the ORM
|
||||||
DB::getConn()->renameField('Member', 'Email', 'Email_renamed');
|
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
|
// Rebuild the database (which re-adds the Email column), and try again
|
||||||
$this->resetDBSchema(true);
|
$this->resetDBSchema(true);
|
||||||
$this->assertTrue(Security::database_is_ready());
|
$this->assertTrue(Security::database_is_ready());
|
||||||
|
|
||||||
|
Security::$force_database_is_ready = $old;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user