wiki.techinc.nl/tests/parser/ParserTestResult.php
umherirrender 092cd8ee31 Fixed some @params documentation (tests)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: Ic8aaf0a93796b97d0fa4617c1f86ff59f4b36131
2014-04-17 20:43:42 +02:00

45 lines
1,021 B
PHP

<?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 string $description 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
* @return bool
*/
public function isSuccess() {
return $this->expected === $this->actual;
}
}