mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: cached fieldlist array can now be cleared
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115445 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
60d09a6c5b
commit
360176d23c
@ -19,6 +19,7 @@ class DatabaseTest extends SapphireTest {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$conn->dontRequireField('DatabaseTest_MyObject', 'MyField');
|
$conn->dontRequireField('DatabaseTest_MyObject', 'MyField');
|
||||||
|
|
||||||
$this->assertArrayHasKey(
|
$this->assertArrayHasKey(
|
||||||
'_obsolete_MyField',
|
'_obsolete_MyField',
|
||||||
$conn->fieldList('DatabaseTest_MyObject'),
|
$conn->fieldList('DatabaseTest_MyObject'),
|
||||||
@ -31,6 +32,9 @@ class DatabaseTest extends SapphireTest {
|
|||||||
function testRenameField() {
|
function testRenameField() {
|
||||||
$conn = DB::getConn();
|
$conn = DB::getConn();
|
||||||
|
|
||||||
|
//Reset our cached fieldlists:
|
||||||
|
$conn->clear_cached_fieldlist();
|
||||||
|
|
||||||
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');
|
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');
|
||||||
|
|
||||||
$this->assertArrayHasKey(
|
$this->assertArrayHasKey(
|
||||||
|
Loading…
Reference in New Issue
Block a user