public function __construct(Story $story) { // initialise our parent first parent::__construct($story->getCategory() . ' > ' . $story->getGroupAsString() . ' > ' . $story->getName()); // remember the story we are reporting on $this->story = $story; // we want success to say 'PASS' rather than 'OKAY' $this->resultStrings[self::OKAY] = 'PASS'; }
/** * called when we end a set of phases * * @param PhaseGroup_Result $result * @return void */ public function endPhaseGroup($result) { $this->testcase['time'] = $result->getDuration(); $this->testcase['status'] = htmlspecialchars($result->getResultString(), ENT_QUOTES | ENT_XML1, 'UTF-8'); $this->testcase['skipped'] = $result->getPhaseGroupSkipped(); $this->testcase['failure'] = $result->resultCode === $result::FAIL; $this->testcase['error'] = $result->resultCode === $result::ERROR; // parent $this->testsuite['testcase'][] = $this->testcase; $this->testsuite['tests'] += 1; $this->testsuite['disabled'] += intval($result->resultCode === $result::BLACKLISTED); $this->testsuite['errors'] += intval($this->testcase['error']); $this->testsuite['failures'] += intval($this->testcase['failure']); $this->testsuite['skipped'] += intval($result->resultCode === $result::SKIPPED); }