From 8e70e7f14a6d9ccad363580915d69e786da17093 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 5 Apr 2017 16:17:43 -0700 Subject: [PATCH] phpunit: Remove unused assertEmpty() fallback for PHPUnit 3 compat We always run with PHPUnit 4. We're also forward-compatible with PHPUnit 5 (albeit with deprecation notices). PHPUnit 3 is no longer supported. Keep __call() to make it easy to re-introduce back-compat or future-compat logic in the future (like the next patch does). Change-Id: I4f836db12d43fb22c4c38c0e1401675d751d7841 --- tests/phpunit/MediaWikiTestCase.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index bb7267a612..564c0ff834 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -1298,7 +1298,6 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { */ public function __call( $func, $args ) { static $compatibility = [ - 'assertEmpty' => 'assertEmpty2', // assertEmpty was added in phpunit 3.7.32 ]; if ( isset( $compatibility[$func] ) ) { @@ -1308,15 +1307,6 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { } } - /** - * Used as a compatibility method for phpunit < 3.7.32 - * @param string $value - * @param string $msg - */ - private function assertEmpty2( $value, $msg ) { - $this->assertTrue( $value == '', $msg ); - } - private static function unprefixTable( &$tableName, $ind, $prefix ) { $tableName = substr( $tableName, strlen( $prefix ) ); } -- 2.20.1