From: Platonides Date: Thu, 10 Feb 2011 09:51:31 +0000 (+0000) Subject: Add support of assertEmpty (used since r81596) for phpunit < 3.5.0 X-Git-Tag: 1.31.0-rc.0~32083 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=4a01e74356a9f6eb881bedf369033aac2d9581b2;p=lhc%2Fweb%2Fwiklou.git Add support of assertEmpty (used since r81596) for phpunit < 3.5.0 --- 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;