From 1e83a8b51e0e7bc94062b177b4d85ffeb7feb77f Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 21 Aug 2009 05:02:31 +0000 Subject: [PATCH] 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 --- tests/DataObjectTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/DataObjectTest.php b/tests/DataObjectTest.php index dde214667..82cec5c42 100644 --- a/tests/DataObjectTest.php +++ b/tests/DataObjectTest.php @@ -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 {