diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/parser/ParserTestResult.php | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/parser/ParserTestResult.php')
-rw-r--r-- | tests/parser/ParserTestResult.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/parser/ParserTestResult.php b/tests/parser/ParserTestResult.php new file mode 100644 index 00000000..d9ad773d --- /dev/null +++ b/tests/parser/ParserTestResult.php @@ -0,0 +1,42 @@ +<?php +/** + * @copyright Copyright © 2013, Antoine Musso + * @copyright Copyright © 2013, Wikimedia Foundation Inc. + * @license GNU GPL v2 + * + * @file + */ + +/** + * Represent the result of a parser test. + * + * @since 1.22 + */ +class ParserTestResult { + /** + * Description of the parser test. + * + * This is usually the text used to describe a parser test in the .txt + * files. It is initialized on a construction and you most probably + * never want to change it. + */ + public $description; + /** Text that was expected */ + public $expected; + /** Actual text rendered */ + public $actual; + + /** + * @param $description string A short text describing the parser test + * usually the text in the parser test .txt file. The description + * is later available using the property $description. + */ + public function __construct( $description ) { + $this->description = $description; + } + + /** Whether the test passed */ + public function isSuccess() { + return $this->expected === $this->actual; + } +} |