diff --git a/module/screen/test/model/buildcomponentlist.php b/module/screen/test/model/buildcomponentlist.php index 3f2ec78fcc..05ae56d553 100755 --- a/module/screen/test/model/buildcomponentlist.php +++ b/module/screen/test/model/buildcomponentlist.php @@ -15,8 +15,14 @@ cid=1 $screen = new screenTest(); -$componentList = $screen->getAllComponent(array('type' => 'line')); +$screenData = $tester->dao->select('*')->from(TABLE_SCREEN)->where('id')->eq(1)->fetch(); +$scheme = json_decode($screenData->scheme); +$componentList = $scheme->componentList; -$list = array(current($componentList), ''); +r(count($componentList)) && p('') && e('44'); //测试组件列表数量是否正确。 -r(count($screen->buildComponentListTest($list))) && p('') && e('1'); //测试带有空元素的情况下,生成的组件列表数量是否正确。 \ No newline at end of file +$component = $componentList[0]; +r($component->chartConfig->chartKey) && p('') && e('group'); //测试组件类型是否正确。 +r($component->id) && p('') && e('5scfjzqsbzo000'); //测试组件id是否正确。 +r($component->isGroup) && p('') && e('1'); //测试组件是否为组。 +r(isset($component->groupList)) && p('') && e('1'); //测试组件是否为组。 \ No newline at end of file