Anomie has uploaded a new change for review.

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

Change subject: Remove MFFauxRequest
......................................................................

Remove MFFauxRequest

Since I3b84246e, it is no longer necessary and in fact unused.

Change-Id: I0c90f33123ed9ec545ea970fff9793b1a0b41768
---
M tests/phpunit/MobileContextTest.php
1 file changed, 1 insertion(+), 31 deletions(-)


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

diff --git a/tests/phpunit/MobileContextTest.php 
b/tests/phpunit/MobileContextTest.php
index 24bc5ba..fb1e4c0 100644
--- a/tests/phpunit/MobileContextTest.php
+++ b/tests/phpunit/MobileContextTest.php
@@ -44,11 +44,7 @@
                        }
                }
 
-               if ( method_exists( 'FauxRequest', 'setCookies' ) ) {
-                       $request = new FauxRequest( $query );
-               } else {
-                       $request = new MFFauxRequest( $query );
-               }
+               $request = new FauxRequest( $query );
                $request->setRequestURL( $url );
                $request->setCookies( $cookies, '' );
 
@@ -611,32 +607,6 @@
                $this->setMwGlobals( 'wgTitle', null );
                SpecialPage::getTitleFor( 'Search' );
                $this->assertTrue( true, 'In case of failure this test just 
crashes' );
-       }
-}
-
-// For backwards compatibility until https://gerrit.wikimedia.org/r/#/c/222339/
-// is merged.
-class MFFauxRequest extends FauxRequest {
-       protected $cookies = array();
-
-       public function getCookie( $key, $prefix = null, $default = null ) {
-               if ( $prefix === null ) {
-                       global $wgCookiePrefix;
-                       $prefix = $wgCookiePrefix;
-               }
-               $name = $prefix . $key;
-               return isset( $this->cookies[$name] ) ? $this->cookies[$name] : 
$default;
-       }
-
-       public function setCookies( $cookies, $prefix = null ) {
-               if ( $prefix === null ) {
-                       global $wgCookiePrefix;
-                       $prefix = $wgCookiePrefix;
-               }
-               foreach ( $cookies as $key => $value ) {
-                       $name = $prefix . $key;
-                       $this->cookies[$name] = $value;
-               }
        }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c90f33123ed9ec545ea970fff9793b1a0b41768
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

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

Reply via email to