public function testGetlistMethodShouldReturnArrayOfProjectObjects() { $ProjectService = new Project_Service_Project(); $result = $ProjectService->getList(); $this->assertInternalType('array', $result); if (is_array($result)) { $isProjectObject = true; foreach ($result as $project) { if (!$project instanceof Project_Model_Project) { $isProjectObject = false; } } $this->assertTrue($isProjectObject); } }
public function listAction() { $projectService = new Project_Service_Project(); $this->view->projects = $projectService->getList(); }