* [unittest] fix addplans file error.
This commit is contained in:
@@ -839,4 +839,21 @@ class projectTest
|
||||
|
||||
return $products;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test add plans.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param array $plans
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function addPlansTest(int $projectID, array $plans): array
|
||||
{
|
||||
$this->objectModel->addPlans($projectID, $plans);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $this->objectModel->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($projectID)->orderBy('order_asc')->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ cid=1
|
||||
|
||||
*/
|
||||
|
||||
$project = new Project();
|
||||
$project = new projectTest();
|
||||
|
||||
$plan = array();
|
||||
$plan[3] = array(1, 4, 7);
|
||||
@@ -43,4 +43,4 @@ r($project->addPlansTest(13, $plan)) && p('3:story,product') && e('4,1'); // 将
|
||||
$plan = array();
|
||||
$plan[1] = array(2, 5, 10, 13);
|
||||
r(count($project->addPlansTest(11, $plan))) && p('') && e('8'); // 将计划2,5,10,13下的需求关联到项目11,查看关联后的需求数
|
||||
r($project->addPlansTest(11, $plan)) && p('0:story,product') && e('13,4'); // 将计划2,5,10,13下的需求关联到项目11,查看关联后的需求ID/产品ID
|
||||
r($project->addPlansTest(11, $plan)) && p('0:story,product') && e('13,4'); // 将计划2,5,10,13下的需求关联到项目11,查看关联后的需求ID/产品ID
|
||||
|
||||
Reference in New Issue
Block a user