jenkins-bot has submitted this change and it was merged.

Change subject: resourceloader: Add test coverage for 
ResourceLoaderContext::msg()
......................................................................


resourceloader: Add test coverage for ResourceLoaderContext::msg()

Brings ResourceLoaderContext coverage to 100%.

Change-Id: I3ccc6aa87c89f69158b8d8684be565403afb4036
---
M tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php 
b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php
index 1093039..baf0b69 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderContextTest.php
@@ -104,4 +104,13 @@
                $this->assertSame( 'Example', $ctx->getUser() );
                $this->assertEquals( 'Example', $ctx->getUserObj()->getName() );
        }
+
+       public function testMsg() {
+               $ctx = new ResourceLoaderContext( $this->getResourceLoader(), 
new FauxRequest( [
+                       'lang' => 'en'
+               ] ) );
+               $msg = $ctx->msg( 'mainpage' );
+               $this->assertInstanceOf( Message::class, $msg );
+               $this->assertSame( 'Main Page', $msg->useDatabase( false 
)->plain() );
+       }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ccc6aa87c89f69158b8d8684be565403afb4036
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to