test: coverage recording now needs to be explicit
[mediawiki.git] / tests / parser / ParserTestResult.php
blobd9ad773d9473ce0971bf0277313a4782dc46ef5c
1 <?php
2 /**
3 * @copyright Copyright © 2013, Antoine Musso
4 * @copyright Copyright © 2013, Wikimedia Foundation Inc.
5 * @license GNU GPL v2
7 * @file
8 */
10 /**
11 * Represent the result of a parser test.
13 * @since 1.22
15 class ParserTestResult {
16 /**
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.
23 public $description;
24 /** Text that was expected */
25 public $expected;
26 /** Actual text rendered */
27 public $actual;
29 /**
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;