X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FParserTestResult.php;h=6396a0189576f67ba972dbe78c621d66e45c232e;hb=f0555bab3d84621aa7a5776c98ae51d72e162291;hp=a7b36721a84caba6a4f38625a4234372f4094ac9;hpb=c9a815608f8878af5c3931b03866e8aced7ba644;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/ParserTestResult.php b/tests/parser/ParserTestResult.php index a7b36721a8..6396a01895 100644 --- a/tests/parser/ParserTestResult.php +++ b/tests/parser/ParserTestResult.php @@ -12,26 +12,22 @@ * @since 1.22 */ class ParserTestResult { - /** - * Description of the parser test. - * - * This is usually the text used to describe a parser test in the .txt - * files. It is initialized on a construction and you most probably - * never want to change it. - */ - public $description; + /** The test info array */ + public $test; /** Text that was expected */ public $expected; /** Actual text rendered */ public $actual; /** - * @param string $description A short text describing the parser test - * usually the text in the parser test .txt file. The description - * is later available using the property $description. + * @param array $test The test info array from TestIterator + * @param string $expected The normalized expected output + * @param string $actual The actual output */ - public function __construct( $description ) { - $this->description = $description; + public function __construct( $test, $expected, $actual ) { + $this->test = $test; + $this->expected = $expected; + $this->actual = $actual; } /** @@ -41,4 +37,8 @@ class ParserTestResult { public function isSuccess() { return $this->expected === $this->actual; } + + public function getDescription() { + return $this->test['desc']; + } }