Exemple #1
0
 public function testSaveMethodWithExistingProjectGivenShouldReturnSuccessConstant()
 {
     $project = new Project_Model_Project();
     $project->setId(1)->setName('DemoProject');
     $projectService = new Project_Service_project();
     $result = $projectService->save($project);
     $this->assertEquals($projectService::PROJECT_UPDATED, $result);
 }
Exemple #2
0
 public function rowToObject(Zend_Db_Table_Row $row)
 {
     $userRow = $row->findParentRow('User_Model_DbTable_Staffmembre', 'Staffmembre');
     $user = new User_Model_Staffmembre();
     $user->setId($userRow->usm_id)->setLogin($userRow->usm_login);
     $project = new Project_Model_Project();
     $project->setId($row->proj_id)->setName($row->proj_name)->setDescription($row->proj_desc)->setDate($row->proj_date)->setStatus($row->proj_statut)->setHomepageUrl($row->proj_hpurl)->setDocUrl($row->proj_docurl)->setUser($user);
     return $project;
 }