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

Change subject: Remove position default logic
......................................................................


Remove position default logic

Follows-up 3e05e38.

See also Ib9821b7b87 in MediaWiki core.

Change-Id: If385f4c9bcf88b824099effa3c5b93545f372e82
---
M ResourceLoaderGlobalModule.php
M tests/ResourceLoaderGlobalModuleTest.php
2 files changed, 1 insertion(+), 18 deletions(-)

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



diff --git a/ResourceLoaderGlobalModule.php b/ResourceLoaderGlobalModule.php
index 46511ea..f9c1ac3 100644
--- a/ResourceLoaderGlobalModule.php
+++ b/ResourceLoaderGlobalModule.php
@@ -53,11 +53,9 @@
        public function __construct( $options ) {
                foreach ( $options as $member => $option ) {
                        switch ( $member ) {
-                               case 'position':
-                                       $this->isPositionDefined = true;
-                                       // fall through
                                case 'wiki':
                                case 'source':
+                               case 'position':
                                        $this->{$member} = (string)$option;
                                        break;
                                case 'type':
diff --git a/tests/ResourceLoaderGlobalModuleTest.php 
b/tests/ResourceLoaderGlobalModuleTest.php
index 850ff51..27cafad 100644
--- a/tests/ResourceLoaderGlobalModuleTest.php
+++ b/tests/ResourceLoaderGlobalModuleTest.php
@@ -35,19 +35,4 @@
                        ),
                );
        }
-
-       /**
-        * Verify that all style modules are setting an explicit position
-        *
-        * @covers ResourceLoaderGlobalModule::isPositionDefault
-        */
-       public function testIsPositionDefault() {
-               $this->setMwGlobals(
-                       'wgGlobalCssJsConfig',
-                       array( 'wiki' => wfWikiID(), 'source' => 'fakesource' )
-               );
-               $rl = new ResourceLoader( 
ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
-               $this->assertTrue( !$rl->getModule( 
'ext.globalCssJs.user.styles' )->isPositionDefault() );
-               $this->assertTrue( !$rl->getModule( 
'ext.globalCssJs.site.styles' )->isPositionDefault() );
-       }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If385f4c9bcf88b824099effa3c5b93545f372e82
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GlobalCssJs
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to