diff --git a/module/testsuite/control.php b/module/testsuite/control.php index b48d7f93b1..dd852e2a16 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -270,7 +270,7 @@ class testsuite extends control /* Check user access rights. */ $this->testsuiteZen->checkTestsuiteAccess($suiteID); - $this->testsuite->deleteSuiteByID($suiteID); + $this->testsuite->delete(TABLE_TESTSUITE, $suiteID); $message = $this->executeHooks($suiteID) ? : ''; if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); diff --git a/module/testsuite/test/model/deletesuitebyid.php b/module/testsuite/test/model/deletesuitebyid.php deleted file mode 100755 index 52269df2bc..0000000000 --- a/module/testsuite/test/model/deletesuitebyid.php +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env php -gen(1); - -/** - -title=测试 testsuiteModel->deleteSuiteByID(); -cid=1 -pid=1 - -检查id为1的套件是否存在 >> 1:0 -测试suiteID值为1 >> 1 -检查id为1的套件是否存在2 >> 1:1 - -*/ -$suiteID = 1; - -$testsuite = new testsuiteTest(); - -r($testsuite->getByIdTest($suiteID)) && p('id;deleted') && e('1;0'); //检查id为1的套件是否存在 -r($testsuite->deleteSuiteByIDTest($suiteID)) && p('') && e('1'); //测试suiteID值为1 -r($testsuite->getByIdTest($suiteID)) && p('id;deleted') && e('1;1'); //检查id为1的套件是否存在2 diff --git a/module/testsuite/test/testsuite.class.php b/module/testsuite/test/testsuite.class.php index fca6e605d8..ab2f6717ab 100644 --- a/module/testsuite/test/testsuite.class.php +++ b/module/testsuite/test/testsuite.class.php @@ -234,23 +234,6 @@ class testsuiteTest return $objects; } - /** - * Test delete suite and library. - * - * @param int $suiteID - * @param string $table - * @access public - * @return int - */ - public function deleteSuiteByIDTest($suiteID, $table = '') - { - $objects = $this->objectModel->deleteSuiteByID($suiteID, $table); - - if(dao::isError()) return dao::getError(); - - return $objects; - } - /** * 测试判断操作是否可以点击。 * Test judge an action is clickable or not.