diff --git a/module/screen/test/model/gennotfoundordraftcomponentoption.php b/module/screen/test/model/gennotfoundordraftcomponentoption.php new file mode 100755 index 0000000000..badbf648d3 --- /dev/null +++ b/module/screen/test/model/gennotfoundordraftcomponentoption.php @@ -0,0 +1,55 @@ +#!/usr/bin/env php +genNotFoundOrDraftComponentOptionTest(null, (object)array(), 'chart')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤1:测试chart类型,空component和空chart对象 +r($screenTest->genNotFoundOrDraftComponentOptionTest(null, (object)array('name' => '测试图表'), 'chart')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted,notFoundText') && e('1,1,1,1,图表 测试图表 未找到或处于草稿状态'); // 步骤2:测试chart类型,空component和有name的chart对象 +r($screenTest->genNotFoundOrDraftComponentOptionTest(null, (object)array('name' => '测试透视表'), 'pivot')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted,notFoundText') && e('1,1,1,1,透视表 测试透视表 未找到或处于草稿状态'); // 步骤3:测试pivot类型,空component和有name的chart对象 +r($screenTest->genNotFoundOrDraftComponentOptionTest((object)array('option' => new stdclass()), (object)array('name' => '测试图表2'), 'chart')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤4:测试chart类型,已有option的component对象 +r($screenTest->genNotFoundOrDraftComponentOptionTest((object)array('option' => (object)array('title' => new stdclass())), (object)array('name' => '测试图表3'), 'chart')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤5:测试chart类型,已有option和title的component对象 \ No newline at end of file