Merge branch 'sprint/tianshujie_case' into 'master'
* Add case of execution modules. See merge request easycorp/zentaopms!5171
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->getLimitedExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取所有受限制的执行ID >> 1
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->getLimitedExecutionTest()) && p() && e('1'); // 获取所有受限制的执行ID
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->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'); // 测试获取执行的任务
|
||||
Reference in New Issue
Block a user