/**
  * 
  * @param string $htmlErrorString
  * @return array
  */
 public function normalise($htmlErrorString)
 {
     $result = new Result();
     $result->setRawError(trim($htmlErrorString));
     if (($normalisedError = $this->processSpecialCase($htmlErrorString)) !== false) {
         $result->setNormalisedError($normalisedError);
         return $result;
     }
     $patternBasedNormaliser = new PatternBasedNormaliser();
     if (($normalisedError = $patternBasedNormaliser->normalise($htmlErrorString)) !== false) {
         $result->setNormalisedError($normalisedError);
         return $result;
     }
     if (($normalisedError = $this->getQuotedParameterNormalisedError($htmlErrorString)) !== false) {
         $result->setNormalisedError($normalisedError);
         return $result;
     }
     return $result;
 }
 public function testResultWithNormalisedErrorIsNormalised()
 {
     $result = new Result();
     $result->setNormalisedError(new NormalisedError());
     $this->assertTrue($result->isNormalised());
 }