./config/my.php.back

This commit is contained in:
pengjiangxiu
2017-03-07 10:15:26 +08:00
parent f1515951b0
commit e4001d23d5
11 changed files with 177 additions and 110 deletions
+39 -45
View File
@@ -1359,53 +1359,47 @@ class bugModel extends model
{
$run = $this->loadModel('testtask')->getRunById($result->run);
}
if($result and $result->caseResult == 'fail')
$title = $run->case->title;
$caseSteps = $run->case->steps;
$stepResults = unserialize($result->stepResults);
if($run->case->precondition != '')
{
$title = $run->case->title;
$caseSteps = $run->case->steps;
$stepResults = unserialize($result->stepResults);
if($run->case->precondition != '')
{
$bugSteps = "<p>[" . $this->lang->testcase->precondition . "]</p>" . "\n" . $run->case->precondition;
}
$bugSteps .= $this->lang->bug->tplStep;
if(!empty($stepResults))
{
$i = 0;
foreach($caseSteps as $key => $step)
{
if(!in_array($step->id, $steps)) continue;
$i++;
$bugSteps .= $i . '. ' . $step->desc . "<br />";
}
$bugSteps .= $this->lang->bug->tplResult;
$i = 0;
foreach($caseSteps as $key => $step)
{
if(!in_array($step->id, $steps)) continue;
$i++;
if(empty($stepResults[$step->id]['real'])) continue;
$bugSteps .= $i . '. ' . $stepResults[$step->id]['real'] . "<br />";
}
$bugSteps .= $this->lang->bug->tplExpect;
$i = 0;
foreach($caseSteps as $key => $step)
{
if(!in_array($step->id, $steps)) continue;
$i++;
if(!$step->expect) continue;
$bugSteps .= $i . '. ' . $step->expect . "<br />";
}
}
else
{
$bugSteps .= $this->lang->bug->tplResult;
$bugSteps .= $this->lang->bug->tplExpect;
}
$bugSteps = "<p>[" . $this->lang->testcase->precondition . "]</p>" . "\n" . $run->case->precondition;
}
$bugSteps .= $this->lang->bug->tplStep;
if(!empty($stepResults))
{
$i = 0;
foreach($caseSteps as $key => $step)
{
if(!in_array($step->id, $steps)) continue;
$i++;
$bugSteps .= $i . '. ' . $step->desc . "<br />";
}
$bugSteps .= $this->lang->bug->tplResult;
$i = 0;
foreach($caseSteps as $key => $step)
{
if(!in_array($step->id, $steps)) continue;
$i++;
if(empty($stepResults[$step->id]['real'])) continue;
$bugSteps .= $i . '. ' . $stepResults[$step->id]['real'] . "<br />";
}
$bugSteps .= $this->lang->bug->tplExpect;
$i = 0;
foreach($caseSteps as $key => $step)
{
if(!in_array($step->id, $steps)) continue;
$i++;
if(!$step->expect) continue;
$bugSteps .= $i . '. ' . $step->expect . "<br />";
}
}
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version);
}