Example #1
0
 public function checkLogicBetweenProjectAndScenario(EiProjet $ei_project, EiScenario $ei_scenario)
 {
     //On vérifie si le scénario appartient bien au projet
     if ($ei_project->getProjectId() != $ei_scenario->getProjectId() || $ei_project->getRefId() != $ei_scenario->getProjectRef()) {
         $this->forward404('Scenario  don\'t belong to project');
     }
 }
 public function getScenarioStats(EiScenario $ei_scenario, Doctrine_Connection $conn = null)
 {
     if ($conn == null) {
         $conn = Doctrine_Manager::connection();
     }
     $q = "\n            SELECT ts.*, SUM(tsf.duree) as scenario_exe_time  \n            FROM `ei_test_set` as ts , ei_test_set_function as tsf, ei_scenario as s\n            WHERE  ts.id=tsf.ei_test_set_id \n            And project_id=" . $ei_scenario->getProjectId() . "  And project_ref=" . $ei_scenario->getProjectRef() . "\n            And ts.ei_scenario_id=" . $ei_scenario->getId() . " \n            GROUP BY ts.id\n            ORDER BY ts.created_at ASC\n                ";
     return $conn->fetchAll($q);
 }