From d74edea7e41d0c0177545abdd1e215f5b92fe95e Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 29 Dec 2010 15:21:25 +0000 Subject: [PATCH] Follow up r79107 for old PHPUnit versions. --- tests/phpunit/bootstrap.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ) ); -- 2.20.1