Krinkle has uploaded a new change for review.

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/324858/1

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: newchange
Gerrit-Change-Id: I3ccc6aa87c89f69158b8d8684be565403afb4036
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

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

Reply via email to