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:
Geoff Munn 2011-01-12 00:10:38 +00:00
parent 60d09a6c5b
commit 360176d23c

View File

@ -19,6 +19,7 @@ class DatabaseTest extends SapphireTest {
);
$conn->dontRequireField('DatabaseTest_MyObject', 'MyField');
$this->assertArrayHasKey(
'_obsolete_MyField',
$conn->fieldList('DatabaseTest_MyObject'),
@ -31,6 +32,9 @@ class DatabaseTest extends SapphireTest {
function testRenameField() {
$conn = DB::getConn();
//Reset our cached fieldlists:
$conn->clear_cached_fieldlist();
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');
$this->assertArrayHasKey(