diff --git a/test/class/execution.class.php b/test/class/execution.class.php index 71beb1a838..7f5b7b8c16 100644 --- a/test/class/execution.class.php +++ b/test/class/execution.class.php @@ -748,6 +748,18 @@ class executionTest } } + /** + * Check the privilege. + * + * @access public + * @return string|bool + */ + public function getLimitedExecutionTest() + { + $this->objectModel->getProductGroupList(); + return isset($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : true; + } + /** * function getProductGroupList test execution * @@ -812,6 +824,19 @@ class executionTest } } + /** + * Get the task data group by execution id list. + * + * @param array $executionIdList + * @access public + * @return int + */ + public function getTaskGroupByExecutionTest($executionIdList = array()) + { + $objects = $this->objectModel->getTaskGroupByExecution($executionIdList); + return count($objects); + } + /** * function getDefaultManagers test by execution * diff --git a/test/model/execution/getlimitedexecution.php b/test/model/execution/getlimitedexecution.php new file mode 100755 index 0000000000..a1e731eece --- /dev/null +++ b/test/model/execution/getlimitedexecution.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +getLimitedExecution(); +cid=1 +pid=1 + +获取所有受限制的执行ID >> 1 + +*/ + +$execution = new executionTest(); + +r($execution->getLimitedExecutionTest()) && p() && e('1'); // 获取所有受限制的执行ID diff --git a/test/model/execution/gettaskgroupbyexecution.php b/test/model/execution/gettaskgroupbyexecution.php new file mode 100755 index 0000000000..009da48eb8 --- /dev/null +++ b/test/model/execution/gettaskgroupbyexecution.php @@ -0,0 +1,23 @@ +#!/usr/bin/env php +getTaskGroupByExecution(); +cid=1 +pid=1 + +获取所有受限制的执行ID >> 1 + +*/ + + +$executionIdList = array(0, 1, 101, 131, 161); + +$execution = new executionTest(); + +r($execution->getTaskGroupByExecutionTest()) && p() && e('0'); // 测试空数据 +r($execution->getTaskGroupByExecutionTest($executionIdList)) && p() && e('3'); // 测试获取执行的任务