MINOR: Unit test breaks if another module or project extends Folder

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111669 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Mark Stephens 2010-10-04 20:42:57 +00:00 committed by Sam Minnee
parent fe0c47ca95
commit e2064090fe

View File

@ -143,7 +143,8 @@ class FolderTest extends SapphireTest {
* Tests for the bug #5994 - if you don't execute get_by_id prior to the rename or move, it will fail.
*/
function testRenameFolderAndCheckTheFile() {
$folder1 = DataObject::get_one('Folder', '"ID"='.$this->idFromFixture('Folder', 'folder1'));
// ID is prefixed in case Folder is subclassed by project/other module.
$folder1 = DataObject::get_one('Folder', '"File"."ID"='.$this->idFromFixture('Folder', 'folder1'));
$folder1->Name = 'FileTest-folder1-changed';
$folder1->write();