5 * @copyright Copyright © 2013, Antoine Musso
6 * @copyright Copyright © 2013, Wikimedia Foundation Inc.
10 * Represent the result of a parser test.
14 class ParserTestResult
{
16 * Description of the parser test.
18 * This is usually the text used to describe a parser test in the .txt
19 * files. It is initialized on a construction and you most probably
20 * never want to change it.
23 /** Text that was expected */
25 /** Actual text rendered */
29 * @param string $description A short text describing the parser test
30 * usually the text in the parser test .txt file. The description
31 * is later available using the property $description.
33 public function __construct( $description ) {
34 $this->description
= $description;
38 * Whether the test passed
41 public function isSuccess() {
42 return $this->expected
=== $this->actual
;