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:
Max Semenik 2019-03-27 20:27:05 -07:00
parent e53676a0ae
commit 593529bc72

View file

@ -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 )
);
}