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 string $description 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;
39 * Whether the test passed
42 public function isSuccess() {
43 return $this->expected
=== $this->actual
;