Merge "mergeMessageFileList: Support reading extension/skin.json files"
[lhc/web/wiklou.git] / tests / parser / ParserTestResult.php
1 <?php
2 /**
3 * @file
4 *
5 * @copyright Copyright © 2013, Antoine Musso
6 * @copyright Copyright © 2013, Wikimedia Foundation Inc.
7 */
8
9 /**
10 * Represent the result of a parser test.
11 *
12 * @since 1.22
13 */
14 class ParserTestResult {
15 /**
16 * Description of the parser test.
17 *
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.
21 */
22 public $description;
23 /** Text that was expected */
24 public $expected;
25 /** Actual text rendered */
26 public $actual;
27
28 /**
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.
32 */
33 public function __construct( $description ) {
34 $this->description = $description;
35 }
36
37 /**
38 * Whether the test passed
39 * @return bool
40 */
41 public function isSuccess() {
42 return $this->expected === $this->actual;
43 }
44 }