Add some tests

This commit is contained in:
Frederic Guillot
2015-09-18 22:37:00 -04:00
parent 1fa72295f2
commit e8228c3975
11 changed files with 208 additions and 87 deletions

View File

@@ -172,16 +172,20 @@ class Project extends Base
{
return $this->db->table(self::TABLE)->asc('name')->findAll();
}
/**
* Get all projects with given Ids
*
* @access public
* @param integer[] $project_ids Projects id
* @param integer[] $project_ids
* @return array
*/
public function getAllByIds($project_ids)
public function getAllByIds(array $project_ids)
{
if (empty($project_ids)) {
return array();
}
return $this->db->table(self::TABLE)->in('id', $project_ids)->asc('name')->findAll();
}