#!/usr/bin/env php genNotFoundOrDraftComponentOptionTest(null, (object)array('name' => '测试图表'), 'chart')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤1:空component参数,chart类型,有图表名称 r($screenTest->genNotFoundOrDraftComponentOptionTest(null, (object)array('name' => '测试透视表'), 'pivot')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤2:空component参数,pivot类型,有透视表名称 r($screenTest->genNotFoundOrDraftComponentOptionTest((object)array(), (object)array(), 'chart')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤3:空component对象,chart类型,无图表名称 r($screenTest->genNotFoundOrDraftComponentOptionTest((object)array('option' => new stdclass()), (object)array('name' => '图表A'), 'chart')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤4:有option但无title的component,chart类型 r($screenTest->genNotFoundOrDraftComponentOptionTest((object)array('option' => (object)array('title' => new stdclass())), (object)array('name' => '透视表B'), 'pivot')) && p('hasOption,hasTitle,hasNotFoundText,isDeleted') && e('1,1,1,1'); // 步骤5:有option和title的component,pivot类型 r($screenTest->genNotFoundOrDraftComponentOptionTest((object)array('id' => 1, 'name' => 'test', 'option' => (object)array('title' => (object)array('text' => 'existing'))), (object)array('name' => '销售图表'), 'chart')) && p('notFoundText') && e('图表 销售图表 未找到或处于草稿状态'); // 步骤6:完整component结构,chart类型,测试notFoundText内容 r($screenTest->genNotFoundOrDraftComponentOptionTest((object)array('id' => 2, 'option' => (object)array('dataset' => array())), (object)array('name' => '数据透视'), 'pivot')) && p('notFoundText') && e('透视表 数据透视 未找到或处于草稿状态'); // 步骤7:完整component结构,pivot类型,测试notFoundText内容