From: Platonides Date: Wed, 29 Dec 2010 15:21:25 +0000 (+0000) Subject: Follow up r79107 for old PHPUnit versions. X-Git-Tag: 1.31.0-rc.0~33009 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=d74edea7e41d0c0177545abdd1e215f5b92fe95e;p=lhc%2Fweb%2Fwiklou.git Follow up r79107 for old PHPUnit versions. --- diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 15b517cb7f..0b6ff9b4d5 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -192,8 +192,16 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { } function __call( $func, $args ) { + static $compatibility = array( + 'assertInternalType' => 'assertType', + 'assertNotInternalType' => 'assertNotType', + 'assertInstanceOf' => 'assertType', + ); + if ( method_exists( $this->suite, $func ) ) { return call_user_func_array( array( $this->suite, $func ), $args); + } elseif ( isset( $compatibility[$func] ) ) { + return call_user_func_array( array( $this, $compatibility[$func] ), $args); } else { throw new MWException( "Called non-existant $func method on " . get_class( $this ) );