phpunit: Remove unused assertEmpty() fallback for PHPUnit 3 compat
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 5 Apr 2017 23:17:43 +0000 (16:17 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 5 Apr 2017 23:20:44 +0000 (16:20 -0700)
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

index bb7267a..564c0ff 100644 (file)
@@ -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 ) );
        }