From 2dca48ba093b30f732ba7673efcef551cb8323e0 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Oct 2010 04:52:20 +0000 Subject: [PATCH] MINOR: Unit test breaks if another module or project extends Folder (from r111669) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112917 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/filesystem/FolderTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/filesystem/FolderTest.php b/tests/filesystem/FolderTest.php index 701bfbce9..0dbe6955d 100644 --- a/tests/filesystem/FolderTest.php +++ b/tests/filesystem/FolderTest.php @@ -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();