* Add test case.
This commit is contained in:
@@ -731,12 +731,13 @@ class executionTest
|
||||
* function getTree test execution
|
||||
*
|
||||
* @param string $executionID
|
||||
* @param string $count
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTreeTest($executionID, $count)
|
||||
public function getTreeTest($executionID)
|
||||
{
|
||||
global $app;
|
||||
$app->moduleName = 'task';
|
||||
$object = $this->executionModel->getTree($executionID);
|
||||
|
||||
if(dao::isError())
|
||||
@@ -744,13 +745,9 @@ class executionTest
|
||||
$error = dao::getError();
|
||||
return $error;
|
||||
}
|
||||
elseif($count == "1")
|
||||
{
|
||||
return count($object);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $object;
|
||||
return $object[0] ? count($object[0]->children) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2720,4 +2717,23 @@ class executionTest
|
||||
|
||||
return $_SESSION['executionBugsearchParams']['queryID'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Test build story search form.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $queryID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildStorySearchFormTest($productID, $queryID)
|
||||
{
|
||||
$product = $this->productModel->getByID($productID);
|
||||
if(empty($product)) return '0';
|
||||
|
||||
$this->executionModel->loadModel('bug');
|
||||
$this->executionModel->buildStorySearchForm(array($productID => $product), $queryID, 'searchBug');
|
||||
|
||||
return $_SESSION['executionBugsearchParams']['queryID'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user