public function managesuitesAction() { try { $projectId = $this->getRequest_ProjectID(); $planId = $this->getRequest_ID(); $this->getAcl()->checkAvailable(Model_ACL::TASK_QA_TEST_PLAN_EDIT, $projectId); $m = Model_DBMapper_ApplicationMapper::get_instance(); $o = $m->find($projectId); if (!isset($o)) { throw new Exception('There is no such Application'); } /** @var $m Model_DBMapper_TestPlanMapper */ $m = Model_DBMapper_TestPlanMapper::get_instance(); $o = $m->find($planId); if (!isset($o)) { throw new Exception('There is no such Test Plan'); } $suitesAssigned = $m->findDependentTestSuites($planId); /** @var $m Model_DBMapper_TestSuiteMapper */ $m = Model_DBMapper_TestSuiteMapper::get_instance(); $suitesNotAssigned = $m->fetchAll_NotAssignedOnTestPlan($planId); $this->view->assign("suitesAssigned", $suitesAssigned); $this->view->assign("suitesNotAssigned", $suitesNotAssigned); } catch (Exception $ex) { echo $ex->getMessage(); } }
protected function getTestSuiteMapper() { if (null === $this->_test_suite_mapper) { $this->setTestSuiteMapper(Model_DBMapper_TestSuiteMapper::get_instance()); } return $this->_test_suite_mapper; }