Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/92039


Change subject: Test for Status::hasMessage
......................................................................

Test for Status::hasMessage

Change-Id: I080e006fa6a7d8ad68bdf827c4bab7d0ea160230
---
M tests/phpunit/includes/StatusTest.php
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/39/92039/1

diff --git a/tests/phpunit/includes/StatusTest.php 
b/tests/phpunit/includes/StatusTest.php
index 332ac52..0a7cc04 100644
--- a/tests/phpunit/includes/StatusTest.php
+++ b/tests/phpunit/includes/StatusTest.php
@@ -177,6 +177,17 @@
                $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 @@
        //todo test getErrorMessageArray
        //todo test getStatusArray
        //todo test getErrorsByType
-       //todo test hasMessage
        //todo test replaceMessage
        //todo test replaceMessage
 

-- 
To view, visit https://gerrit.wikimedia.org/r/92039
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I080e006fa6a7d8ad68bdf827c4bab7d0ea160230
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to