r81880 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81879‎ | r81880 | r81881 >
Date:09:51, 10 February 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Add support of assertEmpty (used since r81596) for phpunit < 3.5.0
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -170,6 +170,7 @@
171171 'assertInternalType' => 'assertType',
172172 'assertNotInternalType' => 'assertNotType',
173173 'assertInstanceOf' => 'assertType',
 174+ 'assertEmpty' => 'assertEmpty2',
174175 );
175176
176177 if ( method_exists( $this->suite, $func ) ) {
@@ -181,6 +182,10 @@
182183 . get_class( $this ) );
183184 }
184185 }
 186+
 187+ static private assertEmpty2( $value, $msg ) {
 188+ return $this->assertTrue( $value == '', $msg );
 189+ }
185190
186191 static private function unprefixTable( $tableName ) {
187192 global $wgDBprefix;

Follow-up revisions

RevisionCommit summaryAuthorDate
r81881Fix the completely broken r81880platonides10:03, 10 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81596Improve PHPUnit code coverage...hashar13:59, 6 February 2011

Comments

#Comment by Hashar (talk | contribs)   21:07, 10 February 2011

I did not know we had a backward compatibility layer. Looks like it solve the issue I have implemented :)

Status & tagging log