From 167e4cb60fc29ac4afcae7303fd337d94e0ada8f Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Sat, 5 Oct 2019 21:31:04 +0200 Subject: [PATCH] Clean up most of b/c for phpunit4 We don't support phpunit4 anymore: https://w.wiki/9UT Change-Id: I13a4a09e21a13c8f1e29b9e0ca29f05d1eac997d --- tests/phpunit/common/HooksTest.php | 1 - tests/phpunit/engines/LuaCommon/LuaEngineUnitTestBase.php | 1 - .../phpunit/engines/LuaCommon/LuaEnvironmentComparisonTest.php | 1 - tests/phpunit/engines/LuaCommon/LuaInterpreterTest.php | 1 - .../engines/LuaStandalone/LuaStandaloneInterpreterTest.php | 3 ++- 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/common/HooksTest.php b/tests/phpunit/common/HooksTest.php index 567ac97d..38352887 100644 --- a/tests/phpunit/common/HooksTest.php +++ b/tests/phpunit/common/HooksTest.php @@ -2,7 +2,6 @@ class ScribuntoHooksTest extends PHPUnit\Framework\TestCase { use MediaWikiCoversValidator; - use PHPUnit4And6Compat; public function provideContentHandlerDefaultModelFor() { return [ diff --git a/tests/phpunit/engines/LuaCommon/LuaEngineUnitTestBase.php b/tests/phpunit/engines/LuaCommon/LuaEngineUnitTestBase.php index 30900a3f..6cfc47b6 100644 --- a/tests/phpunit/engines/LuaCommon/LuaEngineUnitTestBase.php +++ b/tests/phpunit/engines/LuaCommon/LuaEngineUnitTestBase.php @@ -11,7 +11,6 @@ */ abstract class Scribunto_LuaEngineUnitTestBase extends \PHPUnit\Framework\TestCase { use MediaWikiCoversValidator; - use PHPUnit4And6Compat; use Scribunto_LuaEngineTestHelper; private static $staticEngineName = null; diff --git a/tests/phpunit/engines/LuaCommon/LuaEnvironmentComparisonTest.php b/tests/phpunit/engines/LuaCommon/LuaEnvironmentComparisonTest.php index 8e7bc425..c8321475 100644 --- a/tests/phpunit/engines/LuaCommon/LuaEnvironmentComparisonTest.php +++ b/tests/phpunit/engines/LuaCommon/LuaEnvironmentComparisonTest.php @@ -8,7 +8,6 @@ */ class Scribunto_LuaEnvironmentComparisonTest extends PHPUnit\Framework\TestCase { use MediaWikiCoversValidator; - use PHPUnit4And6Compat; public $sandboxOpts = [ 'memoryLimit' => 50000000, diff --git a/tests/phpunit/engines/LuaCommon/LuaInterpreterTest.php b/tests/phpunit/engines/LuaCommon/LuaInterpreterTest.php index 71ccd61a..5bc1c835 100644 --- a/tests/phpunit/engines/LuaCommon/LuaInterpreterTest.php +++ b/tests/phpunit/engines/LuaCommon/LuaInterpreterTest.php @@ -2,7 +2,6 @@ abstract class Scribunto_LuaInterpreterTest extends PHPUnit\Framework\TestCase { use MediaWikiCoversValidator; - use PHPUnit4And6Compat; /** * @return Scribunto_LuaInterpreter diff --git a/tests/phpunit/engines/LuaStandalone/LuaStandaloneInterpreterTest.php b/tests/phpunit/engines/LuaStandalone/LuaStandaloneInterpreterTest.php index f615b58c..ad63c6fc 100644 --- a/tests/phpunit/engines/LuaStandalone/LuaStandaloneInterpreterTest.php +++ b/tests/phpunit/engines/LuaStandalone/LuaStandaloneInterpreterTest.php @@ -129,7 +129,8 @@ class Scribunto_LuaStandaloneInterpreterTest extends Scribunto_LuaInterpreterTes */ public function testLuaToPhpArrayKeyConversion( $lua, $expect ) { if ( $expect instanceof Exception ) { - $this->setExpectedException( Scribunto_LuaError::class, $expect->getMessage() ); + $this->expectException( Scribunto_LuaError::class ); + $this->expectExceptionMessage( $expect->getMessage() ); } $interpreter = $this->newInterpreter();