From: Kunal Mehta Date: Sat, 26 Oct 2013 00:52:46 +0000 (-0700) Subject: Test for Status::hasMessage X-Git-Tag: 1.31.0-rc.0~18382 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=c14f41892426aa8a560ea2a78350cf1f75c13bc9;p=lhc%2Fweb%2Fwiklou.git Test for Status::hasMessage Change-Id: I080e006fa6a7d8ad68bdf827c4bab7d0ea160230 --- diff --git a/tests/phpunit/includes/StatusTest.php b/tests/phpunit/includes/StatusTest.php index 332ac52945..0a7cc0438f 100644 --- a/tests/phpunit/includes/StatusTest.php +++ b/tests/phpunit/includes/StatusTest.php @@ -177,6 +177,17 @@ class StatusTest extends MediaWikiTestCase { $this->assertEquals( 2, count( $status1->getWarningsArray() ) + count( $status1->getErrorsArray() ) ); } + /** + * @covers Status::hasMessage + */ + public function testHasMessage() { + $status = new Status(); + $status->fatal( 'bad' ); + $this->assertTrue( $status->hasMessage( 'bad' ) ); + $this->assertFalse( $status->hasMessage( 'good' ) ); + + } + //todo test cleanParams //todo test getWikiText //todo test getMessage @@ -185,7 +196,6 @@ class StatusTest extends MediaWikiTestCase { //todo test getErrorMessageArray //todo test getStatusArray //todo test getErrorsByType - //todo test hasMessage //todo test replaceMessage //todo test replaceMessage