3 * @copyright Copyright © 2013, Antoine Musso
4 * @copyright Copyright © 2013, Wikimedia Foundation Inc.
11 * Represent the result of a parser test.
15 class ParserTestResult
{
17 * Description of the parser test.
19 * This is usually the text used to describe a parser test in the .txt
20 * files. It is initialized on a construction and you most probably
21 * never want to change it.
24 /** Text that was expected */
26 /** Actual text rendered */
30 * @param $description string A short text describing the parser test
31 * usually the text in the parser test .txt file. The description
32 * is later available using the property $description.
34 public function __construct( $description ) {
35 $this->description
= $description;
38 /** Whether the test passed */
39 public function isSuccess() {
40 return $this->expected
=== $this->actual
;