mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ParserFunctions
synced 2024-11-15 11:59:54 +00:00
Simplify test code
No point in having a property and setUp() just to create a parameterless class. Change-Id: I5e7838004d306aac767380280280eed3108e2253
This commit is contained in:
parent
e53676a0ae
commit
593529bc72
|
@ -5,23 +5,14 @@
|
|||
*/
|
||||
class ExpressionTest extends MediaWikiTestCase {
|
||||
|
||||
/**
|
||||
* @var ExprParser
|
||||
*/
|
||||
protected $parser;
|
||||
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->parser = new ExprParser();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideExpressions
|
||||
*/
|
||||
public function testExpression( $input, $expected ) {
|
||||
$parser = new ExprParser();
|
||||
$this->assertEquals(
|
||||
$expected,
|
||||
$this->parser->doExpression( $input )
|
||||
$parser->doExpression( $input )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue