From a03d2d52d22f2f6111fd0f9ef1fa445aecf5bb33 Mon Sep 17 00:00:00 2001 From: liyang <“liyang@easycorp.ltd”> Date: Thu, 7 Apr 2022 14:33:10 +0800 Subject: [PATCH] add design test --- test/class/design.class.php | 219 ++++++++++++++++++++++++ test/data/designspec.yaml | 35 ++++ test/data/zentao/config.php | 7 +- test/data/zentao/processor.php | 3 +- test/data/zt_config.sql | 36 ++++ test/model/design/assign.php | 21 +++ test/model/design/batchcreate.php | 37 ++++ test/model/design/buildsearchform.php | 17 ++ test/model/design/create.php | 37 ++++ test/model/design/getaffectedscope.php | 17 ++ test/model/design/getbyid.php | 17 ++ test/model/design/getbysearch.php | 17 ++ test/model/design/getcommit.php | 17 ++ test/model/design/getlist.php | 17 ++ test/model/design/getpairs.php | 17 ++ test/model/design/linkcommit.php | 17 ++ test/model/design/printassignedhtml.php | 17 ++ test/model/design/setmenu.php | 17 ++ test/model/design/unlinkcommit.php | 17 ++ test/model/design/update.php | 34 ++++ 20 files changed, 612 insertions(+), 4 deletions(-) create mode 100644 test/class/design.class.php create mode 100644 test/data/designspec.yaml create mode 100644 test/data/zt_config.sql create mode 100644 test/model/design/assign.php create mode 100644 test/model/design/batchcreate.php create mode 100644 test/model/design/buildsearchform.php create mode 100644 test/model/design/create.php create mode 100644 test/model/design/getaffectedscope.php create mode 100644 test/model/design/getbyid.php create mode 100644 test/model/design/getbysearch.php create mode 100644 test/model/design/getcommit.php create mode 100644 test/model/design/getlist.php create mode 100644 test/model/design/getpairs.php create mode 100644 test/model/design/linkcommit.php create mode 100644 test/model/design/printassignedhtml.php create mode 100644 test/model/design/setmenu.php create mode 100644 test/model/design/unlinkcommit.php create mode 100644 test/model/design/update.php diff --git a/test/class/design.class.php b/test/class/design.class.php new file mode 100644 index 0000000000..707cd48d02 --- /dev/null +++ b/test/class/design.class.php @@ -0,0 +1,219 @@ +objectModel = $tester->loadModel('design'); + } + + /** + * Function create test by design + * + * @param int $projectID + * @param array $param + * @access public + * @return object + */ + public function createTest($projectID, $param = array()) + { + $labels = array(); + $files = array(); + + $createFields = array('product' => '', 'story' => '', 'type' => '', 'name' => '', 'labels' => $labels, 'files' => $files, 'desc' => ''); + foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; + foreach($param as $key => $value) $_POST[$key] = $value; + + $objectID = $this->objectModel->create($projectID); + + unset($_POST); + + if(dao::isError()) return dao::getError(); + + $objects = $this->objectModel->getByID($objectID); + + return $objects; + } + + /** + * Function batchCreate test by desgin + * + * @param int $projectID + * @param int $productID + * @param array $param + * @access public + * @return array + */ + public function batchCreateTest($projectID, $productID, $param = array()) + { + global $tester; + + $story = array('', '', '', ''); + $type = array('', '', '', ''); + $name = array('', '', '', ''); + $desc = array('', '', '', ''); + + $createFields = array('story' => $story, 'type' => $type, 'name' => $name, 'desc' => $desc); + foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; + foreach($param as $key => $value) $_POST[$key] = $value; + + $this->objectModel->batchCreate($projectID, $productID); + + unset($_POST); + + if(dao::isError()) return dao::getError(); + + $objects = $tester->dao->select('*')->from(TABLE_DESIGN)->where('project')->eq($projectID)->andwhere('product')->eq($productID)->fetchAll(); + + return $objects; + } + + /** + * Function update test by desgin + * + * @param int $designID + * @param array $param + * @access public + * @return array + */ + public function updateTest($designID, $param = array()) + { + global $tester; + + $labels = array(); + $files = array(); + + $createFields = $tester->dao->select('`product`,`story`,`type`,`name`,`desc`')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetchAll(); + $createFields[0]->labels = $labels; + $createFields[0]->files = $files; + foreach($createFields[0] as $field => $defaultValue) $_POST[$field] = $defaultValue; + foreach($param as $key => $value) $_POST[$key] = $value; + + $objects = $this->objectModel->update($designID); + + unset($_POST); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function assignTest($designID, $param = array()) + { + global $tester; + + $createFields = array('assignedTo' => '', 'comment' => ''); + + foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue; + foreach($param as $key => $value) $_POST[$key] = $value; + + $this->objectModel->assign($designID); + + unset($_POST); + + if(dao::isError()) return dao::getError(); + + $objects = $tester->dao->select('*')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetchAll(); + + return $objects; + } + + public function linkCommitTest($designID = 0, $repoID = 0) + { + $objects = $this->objectModel->linkCommit($designID = 0, $repoID = 0); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function unlinkCommitTest($designID = 0, $commitID = 0) + { + $objects = $this->objectModel->unlinkCommit($designID = 0, $commitID = 0); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function getByIDTest($designID = 0) + { + $objects = $this->objectModel->getByID($designID = 0); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function getPairsTest($productID = 0, $type = 'all') + { + $objects = $this->objectModel->getPairs($productID = 0, $type = 'all'); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function getAffectedScopeTest($design = 0) + { + $objects = $this->objectModel->getAffectedScope($design = 0); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function getListTest($projectID = 0, $productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null) + { + $objects = $this->objectModel->getList($projectID = 0, $productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function getCommitTest($designID = 0, $pager = null) + { + $objects = $this->objectModel->getCommit($designID = 0, $pager = null); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function getBySearchTest($projectID = 0, $productID = 0, $queryID = 0, $orderBy = 'id_desc', $pager = null) + { + $objects = $this->objectModel->getBySearch($projectID = 0, $productID = 0, $queryID = 0, $orderBy = 'id_desc', $pager = null); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function setMenuTest($projectID, $products, $productID = 0) + { + $objects = $this->objectModel->setMenu($projectID, $products, $productID = 0); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function buildSearchFormTest($queryID = 0, $actionURL = '') + { + $objects = $this->objectModel->buildSearchForm($queryID = 0, $actionURL = ''); + + if(dao::isError()) return dao::getError(); + + return $objects; + } + + public function printAssignedHtmlTest($design = '', $users = '') + { + $objects = $this->objectModel->printAssignedHtml($design = '', $users = ''); + + if(dao::isError()) return dao::getError(); + + return $objects; + } +} diff --git a/test/data/designspec.yaml b/test/data/designspec.yaml new file mode 100644 index 0000000000..882ae4730f --- /dev/null +++ b/test/data/designspec.yaml @@ -0,0 +1,35 @@ +title: table zt_designspec +desc: "" +author: automated export +version: "1.0" +fields: + - field: design + note: "" + range: 1-120 + prefix: "" + postfix: "" + format: "" + - field: version + note: "" + range: 1 + prefix: "" + postfix: "" + format: "" + - field: name + note: "" + range: 1-10000 + prefix: "这是一个设计" + postfix: "" + format: "" + - field: desc + note: "" + range: 1-10000 + prefix: "这是设计描述" + postfix: "" + format: "" + - field: files + note: "" + range: "" + prefix: "" + postfix: "" + format: "" diff --git a/test/data/zentao/config.php b/test/data/zentao/config.php index a7a1d4c747..74634d3ad7 100644 --- a/test/data/zentao/config.php +++ b/test/data/zentao/config.php @@ -80,9 +80,10 @@ $builder->doclib = array('rows' => 900, 'extends' => array('doclib')); $builder->doc = array('rows' => 900, 'extends' => array('doc')); $builder->doccontent = array('rows' => 900, 'extends' => array('doccontent')); -$builder->build = array('rows' => 20, 'extends' => array('build')); -$builder->release = array('rows' => 10, 'extends' => array('release')); -$builder->design = array('rows' => 120, 'extends' => array('design')); +$builder->build = array('rows' => 20, 'extends' => array('build')); +$builder->release = array('rows' => 10, 'extends' => array('release')); +$builder->design = array('rows' => 120, 'extends' => array('design')); +$builder->designspec = array('rows' => 120, 'extends' => array('designspec')); $builder->webhook = array('rows' => 7, 'extends' => array('webhook')); $builder->entry = array('rows' => 1, 'extends' => array('entry')); diff --git a/test/data/zentao/processor.php b/test/data/zentao/processor.php index ad10f9ab65..68ca0b4476 100644 --- a/test/data/zentao/processor.php +++ b/test/data/zentao/processor.php @@ -32,6 +32,7 @@ class Processor { $this->dao->begin(); + $this->initBassicSql(); $this->initDept(); $this->initUser(); $this->initProgram(); @@ -50,7 +51,6 @@ class Processor $this->initBug(); $this->initTest(); $this->initTodo(); - $this->initBassicSql(); $this->dao->commit(); } @@ -296,6 +296,7 @@ class Processor { global $app; $sqlRoot = $app->getAppRoot(); + $this->dao->exec(file_get_contents($sqlRoot . '/data/zt_config.sql')); $this->dao->exec(file_get_contents($sqlRoot . '/data/zt_lang.sql')); $this->dao->exec(file_get_contents($sqlRoot . '/data/zt_cron.sql')); } diff --git a/test/data/zt_config.sql b/test/data/zt_config.sql new file mode 100644 index 0000000000..4f57594c7c --- /dev/null +++ b/test/data/zt_config.sql @@ -0,0 +1,36 @@ +truncate `zt_config`; +INSERT INTO `zt_config` (`id`, `vision`, `owner`, `module`, `section`, `key`, `value`) VALUES +(1, 'rnd', 'system', 'custom', '', 'hourPoint', '0'), +(2, 'rnd', 'system', 'common', '', 'CRProduct', '1'), +(3, 'rnd', 'system', 'common', '', 'CRExecution', '1'), +(4, 'rnd', 'system', 'custom', '', 'URSR', '2'), +(9, 'rnd', 'system', 'common', 'global', 'mode', 'new'), +(6, 'rnd', 'system', 'project', '', 'unitList', 'CNY,USD'), +(7, 'rnd', 'system', 'project', '', 'defaultCurrency', 'CNY'), +(8, 'rnd', 'system', 'story', '', 'reviewRules', 'allpass'), +(10, 'rnd', 'system', 'common', 'global', 'version', '16.5.beta1'), +(11, 'rnd', 'system', 'common', 'global', 'sn', 'c8aa3269e181f2b9258ce96625de1497'), +(12, 'rnd', 'system', 'common', 'global', 'flow', 'full'), +(13, 'rnd', 'system', 'common', 'safe', 'mode', '1'), +(14, 'rnd', 'system', 'common', 'safe', 'changeWeak', '1'), +(15, 'rnd', 'system', 'common', 'global', 'cron', '1'), +(16, 'rnd', 'system', 'common', 'xuanxuan', 'turnon', '1'), +(17, 'rnd', 'system', 'common', 'xuanxuan', 'key', 'd3229cab1d072d31c505a027dbd3cd6e'), +(18, 'rnd', 'system', 'common', 'xuanxuan', 'chatPort', '11444'), +(19, 'rnd', 'system', 'common', 'xuanxuan', 'commonPort', '11443'), +(20, 'rnd', 'system', 'common', 'xuanxuan', 'ip', '0.0.0.0'), +(21, 'rnd', 'system', 'common', 'xuanxuan', 'uploadFileSize', '20'), +(22, 'rnd', 'system', 'common', 'xuanxuan', 'https', 'off'), +(23, 'rnd', 'system', 'cron', 'run', 'status', 'running'), +(24, 'rnd', 'system', 'common', 'global', 'latestVersionList', '[]'), +(25, 'rnd', 'admin', 'common', '', 'URSR', '2'), +(26, 'rnd', 'admin', 'common', '', 'programLink', 'program-browse'), +(27, 'rnd', 'admin', 'common', '', 'productLink', 'product-all'), +(28, 'rnd', 'admin', 'common', '', 'projectLink', 'project-browse'), +(29, 'rnd', 'admin', 'common', '', 'executionLink', 'execution-task'), +(30, 'rnd', 'admin', 'common', '', 'preferenceSetted', '1'), +(31, 'rnd', 'admin', 'my', 'common', 'blockInited', '1'), +(32, 'rnd', 'admin', 'my', 'block', 'initVersion', '2'), +(33, 'rnd', 'system', 'common', 'global', 'skipIntroduction', ',admin'), +(34, 'rnd', 'system', 'common', 'global', 'skipTutorial', ',admin'), +(35, 'rnd', 'system', 'common', 'global', 'skipYoungBlueTheme', ',admin'); diff --git a/test/model/design/assign.php b/test/model/design/assign.php new file mode 100644 index 0000000000..a043aaaa5e --- /dev/null +++ b/test/model/design/assign.php @@ -0,0 +1,21 @@ +#!/usr/bin/env php +assign(); +cid=1 +pid=1 + +*/ +$designID = '17'; + +$normalAssign = array('assignedTo' => 'dev10', 'comment' => '提交信息'); +$noAssignedTo = array('comment' => '提交信息'); + +$design = new designTest(); +r($design->assignTest($designID, $normalAssign)) && p('0:assignedTo') && e('dev10');//设置指派人 +r($design->assignTest($designID, $noAssignedTo)) && p('0:assignedTo') && e(''); //指派人为空 diff --git a/test/model/design/batchcreate.php b/test/model/design/batchcreate.php new file mode 100644 index 0000000000..c1f41e26c2 --- /dev/null +++ b/test/model/design/batchcreate.php @@ -0,0 +1,37 @@ +#!/usr/bin/env php +batchCreate(); +cid=1 +pid=1 + +*/ +$projectIDList = array('12', '32', '62', '13', '71', '72', '73', '75'); +$productIDList = array('1', '21', '41'); +$storys = array('1', '2', '3', '5'); +$types = array('HLDS', 'DDS', 'DBDS', 'ADS'); +$names = array('设计一', '设计二', '设计三', '设计四'); +$desc = array('详情一', '详情二', '详情三', '详情四'); + +$normalDesign = array('story' => $storys, 'type' => $types, 'name' => $names, 'desc' => $desc); +$noStoryDesign = array('type' => $types, 'name' => $names, 'desc' => $desc); +$noTypeDesign = array('story' => $storys, 'name' => $names, 'desc' => $desc); +$noNameDesign = array('story' => $storys, 'type' => $types, 'desc' => $desc); +$noDescDesign = array('story' => $storys, 'type' => $types, 'name' => $names); + +$design = new designTest(); +r($design->batchCreateTest($projectIDList[0], $productIDList[0], $normalDesign)) && p('0:name') && e('设计一'); //批量创建敏捷项目设计 +r($design->batchCreateTest($projectIDList[1], $productIDList[1], $normalDesign)) && p('0:project') && e('32'); //批量创建瀑布项目设计 +r($design->batchCreateTest($projectIDList[2], $productIDList[2], $normalDesign)) && p('0:product') && e('41'); //批量创建看板项目设计 +r($design->batchCreateTest($projectIDList[3], $productIDList[0], $noStoryDesign)) && p('0:story') && e(''); //不输入需求 +r($design->batchCreateTest($projectIDList[4], $productIDList[0], $noTypeDesign)) && p('type:0') && e('『设计类型』不能为空。');//不输入类型 +r($design->batchCreateTest($projectIDList[5], $productIDList[0], $noNameDesign)) && p() && e('0'); //不输入名字 +r($design->batchCreateTest($projectIDList[6], $productIDList[0], $noDescDesign)) && p('0:desc') && e(''); //不输入详情 +r(count($design->batchCreateTest($projectIDList[7], $productIDList[0], $noDescDesign))) && p() && e('4'); //批量创建设计数量统计 + +system("./ztest init"); diff --git a/test/model/design/buildsearchform.php b/test/model/design/buildsearchform.php new file mode 100644 index 0000000000..a3e8885051 --- /dev/null +++ b/test/model/design/buildsearchform.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +buildSearchForm(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->buildSearchFormTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/create.php b/test/model/design/create.php new file mode 100644 index 0000000000..8422317beb --- /dev/null +++ b/test/model/design/create.php @@ -0,0 +1,37 @@ +#!/usr/bin/env php +create(); +cid=1 +pid=1 + +*/ +$projectIDList = array('11', '31', '61'); +$products = array('1', '21', '41'); +$type = array('HLDS', 'DDS', 'DBDS', 'ADS'); + +$hldsDesign = array('product' => $products[0], 'story' => '1', 'type' => $type[0], 'name' => 'hlds设计'); +$ddsDesign = array('product' => $products[1], 'story' => '2', 'type' => $type[1], 'name' => 'dds设计'); +$dbdsDesign = array('product' => $products[2], 'story' => '3', 'type' => $type[2], 'name' => 'dbds设计'); +$adsDesign = array('product' => $products[0], 'story' => '1', 'type' => $type[3], 'name' => 'ads设计'); +$noProductDesign = array('story' => '1', 'type' => $type[3], 'name' => 'ads设计'); +$noStoryDesign = array('product' => $products[0], 'type' => $type[3], 'name' => 'ads设计'); +$noTypeDesign = array('product' => $products[0], 'story' => '1', 'name' => 'ads设计'); +$noNameDesign = array('product' => $products[0], 'story' => '1', 'type' => $type[3]); + +$design = new designTest(); +r($design->createTest($projectIDList[0], $hldsDesign)) && p('name') && e('hlds设计'); //创建hlds设计 +r($design->createTest($projectIDList[1], $ddsDesign)) && p('story') && e('2'); //创建dds设计 +r($design->createTest($projectIDList[2], $dbdsDesign)) && p('product') && e('61'); //创建dbds设计 +r($design->createTest($projectIDList[0], $adsDesign)) && p('type') && e('ADS'); //创建ads设计 +r($design->createTest($projectIDList[0], $noProductDesign)) && p('product') && e(''); //不输入产品创建设计 +r($design->createTest($projectIDList[0], $noStoryDesign)) && p('story') && e(''); //不输入需求创建设计 +r($design->createTest($projectIDList[0], $noTypeDesign)) && p('type:0') && e('『设计类型』不能为空。'); //不输入类型创建设计 +r($design->createTest($projectIDList[0], $noNameDesign)) && p('name:0') && e('『设计名称』不能为空。'); //不输入名称创建设计 + +system("./ztest init"); diff --git a/test/model/design/getaffectedscope.php b/test/model/design/getaffectedscope.php new file mode 100644 index 0000000000..77926c3055 --- /dev/null +++ b/test/model/design/getaffectedscope.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +getAffectedScope(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->getAffectedScopeTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/getbyid.php b/test/model/design/getbyid.php new file mode 100644 index 0000000000..203545d5ef --- /dev/null +++ b/test/model/design/getbyid.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +getByID(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->getByIDTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/getbysearch.php b/test/model/design/getbysearch.php new file mode 100644 index 0000000000..080af401ca --- /dev/null +++ b/test/model/design/getbysearch.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +getBySearch(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->getBySearchTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/getcommit.php b/test/model/design/getcommit.php new file mode 100644 index 0000000000..55af465786 --- /dev/null +++ b/test/model/design/getcommit.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +getCommit(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->getCommitTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/getlist.php b/test/model/design/getlist.php new file mode 100644 index 0000000000..107edf2276 --- /dev/null +++ b/test/model/design/getlist.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +getList(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->getListTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/getpairs.php b/test/model/design/getpairs.php new file mode 100644 index 0000000000..b4e44c88af --- /dev/null +++ b/test/model/design/getpairs.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +getPairs(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->getPairsTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/linkcommit.php b/test/model/design/linkcommit.php new file mode 100644 index 0000000000..c4a550922f --- /dev/null +++ b/test/model/design/linkcommit.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +linkCommit(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->linkCommitTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/printassignedhtml.php b/test/model/design/printassignedhtml.php new file mode 100644 index 0000000000..3a4a9f749f --- /dev/null +++ b/test/model/design/printassignedhtml.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +printAssignedHtml(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->printAssignedHtmlTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/setmenu.php b/test/model/design/setmenu.php new file mode 100644 index 0000000000..f903541df6 --- /dev/null +++ b/test/model/design/setmenu.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +setMenu(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->setMenuTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/unlinkcommit.php b/test/model/design/unlinkcommit.php new file mode 100644 index 0000000000..082ea109e9 --- /dev/null +++ b/test/model/design/unlinkcommit.php @@ -0,0 +1,17 @@ +#!/usr/bin/env php +unlinkCommit(); +cid=1 +pid=1 + +*/ + +$design = new designTest(); + +r($design->unlinkCommitTest()) && p() && e(); \ No newline at end of file diff --git a/test/model/design/update.php b/test/model/design/update.php new file mode 100644 index 0000000000..95e5386b32 --- /dev/null +++ b/test/model/design/update.php @@ -0,0 +1,34 @@ +#!/usr/bin/env php +update(); +cid=1 +pid=1 + +*/ +$designIDList = array('1', '2', '3'); + +$updateType = array('type' => 'DDS'); +$updateStory = array('story' => '17'); +$updateProduct = array('product' => '21'); +$updateName = array('name' => '修改设计'); +$updateDesc = array('desc' => '详情修改'); +$noName = array('name' => ''); +$noType = array('type' => ''); + +$design = new designTest(); + +r($design->updateTest($designIDList[0],$updateType)) && p('0:field,old,new') && e('type,HLDS,DDS'); //修改设计类型 +r($design->updateTest($designIDList[1],$updateStory)) && p('0:field,old,new') && e('story,0,17'); //修改设计需求 +r($design->updateTest($designIDList[2],$updateProduct)) && p('0:field,old,new') && e('product,31,21'); //修改设计产品 +r($design->updateTest($designIDList[0],$updateName)) && p('0:field,old,new') && e('name,这是一个设计1,修改设计');//修改设计名称 +r($design->updateTest($designIDList[0],$updateDesc)) && p('0:field,old,new') && e('desc,这是设计描述1,详情修改');//修改设计详情 +r($design->updateTest($designIDList[0],$noName)) && p('name:0') && e('『设计名称』不能为空。'); //设计名称不能为空 +r($design->updateTest($designIDList[0],$noType)) && p('type:0') && e('『设计类型』不能为空。'); //设计类型不能为空 + +system("./ztest init");