Phuedx has uploaded a new change for review.

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

Change subject: Revert "Revert "Hygiene: Remove BogusMobileContext""
......................................................................

Revert "Revert "Hygiene: Remove BogusMobileContext""

This reverts commit 8b5fc331bc83fb0bc6387880442263167252e908.

Bug: T143875
Change-Id: I642f03997ce4df3034cf3410e75eaa16e3f67e2e
---
M includes/MobileContext.php
M tests/phpunit/MobileContextTest.php
2 files changed, 0 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/04/311104/1

diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index a848cb7..dadf7a0 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -132,20 +132,6 @@
        }
 
        /**
-        * Overrides the singleton instance.
-        *
-        * @deprecated See `MobileContext::singleton`.
-        *
-        * @warning This method should only accept instances of 
`MobileContext`. The `BogusMobileContext`
-        *  class is used in the `MobileContextTest` test suite and will be 
removed.
-        *
-        * @param {MobileContext} $instance
-        */
-       public static function setInstanceForTesting( $instance ) {
-               self::$instance = $instance;
-       }
-
-       /**
         * Resets the `MobileFrontend.MobileContext` service and singleton 
instance.
         *
         * @deprecated See `MobileContext::singleton`.
diff --git a/tests/phpunit/MobileContextTest.php 
b/tests/phpunit/MobileContextTest.php
index b98b6cd..c7a42ee 100644
--- a/tests/phpunit/MobileContextTest.php
+++ b/tests/phpunit/MobileContextTest.php
@@ -34,8 +34,6 @@
 
        protected function setUp() {
                parent::setUp();
-               // Permit no access to the singleton
-               MobileContext::setInstanceForTesting( new BogusMobileContext() 
);
 
                $this->config = new GlobalVarConfig();
                $this->baseContext = RequestContext::getMain();
@@ -691,11 +689,5 @@
                $context = $this->makeContext();
 
                $this->assertSame( $this->config, $context->getMFConfig() );
-       }
-}
-
-class BogusMobileContext {
-       public function __call( $who, $cares ) {
-               throw new Exception( "Don't touch me!" );
        }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I642f03997ce4df3034cf3410e75eaa16e3f67e2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx <g...@samsmith.io>

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

Reply via email to