private function addResult($result, SpecificationNode $spec, $title = null)
 {
     $map = array(ResultEvent::SUCCEED => 'Succeed: %title%', ResultEvent::FAILED => 'Failed: %title%', ResultEvent::BROKEN => 'Broken: %title%', ResultEvent::ERROR => 'Error: %title%');
     $r = $spec->getClassReflection();
     $arguments = array('file' => $r->getFileName());
     $key = md5($r->getFileName() . $title);
     $format = $map[$result];
     $title = $title == null ? $spec->getTitle() : $spec->getTitle() . '::' . $title;
     $message = strtr($format, array('%title%' => '<highlight>' . $title . '</highlight>'));
     $this->results[$key] = ResultEvent::create($result, $message, $arguments);
 }