From 4a01e74356a9f6eb881bedf369033aac2d9581b2 Mon Sep 17 00:00:00 2001 From: Platonides Date: Thu, 10 Feb 2011 09:51:31 +0000 Subject: [PATCH] Add support of assertEmpty (used since r81596) for phpunit < 3.5.0 --- tests/phpunit/MediaWikiTestCase.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index da02fe7c62..5caac22b3d 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -170,6 +170,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { 'assertInternalType' => 'assertType', 'assertNotInternalType' => 'assertNotType', 'assertInstanceOf' => 'assertType', + 'assertEmpty' => 'assertEmpty2', ); if ( method_exists( $this->suite, $func ) ) { @@ -181,6 +182,10 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { . get_class( $this ) ); } } + + static private assertEmpty2( $value, $msg ) { + return $this->assertTrue( $value == '', $msg ); + } static private function unprefixTable( $tableName ) { global $wgDBprefix; -- 2.20.1