Move ChronologyProtector/TransactionProfiler to Rdbms namespace
[mediawiki.git] / tests / parser / ParserTestResult.php
blob6396a0189576f67ba972dbe78c621d66e45c232e
1 <?php
2 /**
3 * @file
5 * @copyright Copyright © 2013, Antoine Musso
6 * @copyright Copyright © 2013, Wikimedia Foundation Inc.
7 */
9 /**
10 * Represent the result of a parser test.
12 * @since 1.22
14 class ParserTestResult {
15 /** The test info array */
16 public $test;
17 /** Text that was expected */
18 public $expected;
19 /** Actual text rendered */
20 public $actual;
22 /**
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 ) {
28 $this->test = $test;
29 $this->expected = $expected;
30 $this->actual = $actual;
33 /**
34 * Whether the test passed
35 * @return bool
37 public function isSuccess() {
38 return $this->expected === $this->actual;
41 public function getDescription() {
42 return $this->test['desc'];