diff --git a/module/product/test/lib/zen.class.php b/module/product/test/lib/zen.class.php index 0bfadc4a8f..7c26b7d42b 100644 --- a/module/product/test/lib/zen.class.php +++ b/module/product/test/lib/zen.class.php @@ -478,6 +478,19 @@ class productZenTest extends baseTest return $result; } + /** + * Test getExportFields method. + * + * @access public + * @return array + */ + public function getExportFieldsTest() + { + $result = $this->invokeArgs('getExportFields', array()); + if(dao::isError()) return dao::getError(); + return $result; + } + /** * Test getExportData method. * diff --git a/module/product/test/zen/getexportfields.php b/module/product/test/zen/getexportfields.php new file mode 100755 index 0000000000..2b4859e257 --- /dev/null +++ b/module/product/test/zen/getexportfields.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +getExportFieldsTest()) && p('name') && e('产品名称'); // 步骤1:测试返回的字段数组包含name字段且值为产品名称 +r($productTest->getExportFieldsTest()) && p('productLine') && e('所属产品线'); // 步骤2:测试返回的字段数组包含productLine字段且值为所属产品线 +r($productTest->getExportFieldsTest()) && p('PO') && e('负责人'); // 步骤3:测试返回的字段数组包含PO字段且值为负责人 +r($productTest->getExportFieldsTest()) && p('draftStories') && e(' - 草稿'); // 步骤4:测试返回的字段包含draftStories字段且包含草稿关键词 +r(gettype($productTest->getExportFieldsTest())) && p() && e('array'); // 步骤5:测试返回的字段数据类型是数组 \ No newline at end of file