* Add test of program model.

This commit is contained in:
田淑杰
2023-01-05 11:30:15 +08:00
parent 682d97e9f5
commit 6e02dc58ea
2 changed files with 35 additions and 10 deletions
+17
View File
@@ -117,4 +117,21 @@ class programTest
return $program;
}
/**
* Get budget left.
*
* @param int $programID
* @access public
* @return int
*/
public function getBudgetLeftTest($programID)
{
$program = $this->program->getByID($programID);
$budget = $this->program->getBudgetLeft($program);
if(dao::isError()) return array('message' => dao::getError());
return $budget;
}
}