From: Timo Tijhof Date: Wed, 5 Apr 2017 23:17:43 +0000 (-0700) Subject: phpunit: Remove unused assertEmpty() fallback for PHPUnit 3 compat X-Git-Tag: 1.31.0-rc.0~3569^2~1 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=8e70e7f14a6d9ccad363580915d69e786da17093;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) ); }