From 593529bc725dbf15a395d6bce97299c40397b14c Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Wed, 27 Mar 2019 20:27:05 -0700 Subject: [PATCH] Simplify test code No point in having a property and setUp() just to create a parameterless class. Change-Id: I5e7838004d306aac767380280280eed3108e2253 --- tests/phpunit/ExpressionTest.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/phpunit/ExpressionTest.php b/tests/phpunit/ExpressionTest.php index c9f2e390..98940dc7 100644 --- a/tests/phpunit/ExpressionTest.php +++ b/tests/phpunit/ExpressionTest.php @@ -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 ) ); }