Ensure that DataObject->ClassName is set on object instantiation

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84981 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-08-21 05:02:31 +00:00
parent df31edf8b6
commit 1e83a8b51e

View File

@ -757,6 +757,11 @@ class DataObjectTest extends SapphireTest {
$this->assertEquals(array('obj1', 'obj2'), $values);
}
function testClassNameSetForNewObjects() {
$d = new DataObjectTest_Player();
$this->assertEquals('DataObjectTest_Player', $d->ClassName);
}
}
class DataObjectTest_Player extends Member implements TestOnly {