silverstripe-framework/tests/ArrayDataTest.php
Sam Minnee 41fb93b344 ENHANCEMENT #3032 ajshort: Use static methods for accessing static data
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73036 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-14 00:16:32 +00:00

15 lines
422 B
PHP

<?php
class ArrayDataTest extends SapphireTest {
function testViewabledataItemsInsideArraydataArePreserved() {
/* ViewableData objects will be preserved, but other objects will be converted */
$arrayData = new ArrayData(array(
"A" => new Varchar("A"),
"B" => new stdClass(),
));
$this->assertEquals("Varchar", get_class($arrayData->A));
$this->assertEquals("ArrayData", get_class($arrayData->B));
}
}