mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
14 lines
419 B
PHP
14 lines
419 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 Object(),
|
||
|
));
|
||
|
$this->assertEquals("Varchar", get_class($arrayData->A));
|
||
|
$this->assertEquals("ArrayData", get_class($arrayData->B));
|
||
|
}
|
||
|
}
|