5 * @copyright Copyright © 2013, Antoine Musso
6 * @copyright Copyright © 2013, Wikimedia Foundation Inc.
10 * Represent the result of a parser test.
14 class ParserTestResult
{
15 /** The test info array */
17 /** Text that was expected */
19 /** Actual text rendered */
23 * @param array $test The test info array from TestIterator
24 * @param string $expected The normalized expected output
25 * @param string $actual The actual output
27 public function __construct( $test, $expected, $actual ) {
29 $this->expected
= $expected;
30 $this->actual
= $actual;
34 * Whether the test passed
37 public function isSuccess() {
38 return $this->expected
=== $this->actual
;
41 public function getDescription() {
42 return $this->test
['desc'];