Jdlrobson has uploaded a new change for review.

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

Change subject: @phuedx: One possible fix
......................................................................

@phuedx: One possible fix

Change-Id: Ie7f20ea0a89d2ab8e1510a4662132fe244c9fd66
---
M tests/phpunit/devices/DeviceDetectorServiceIntegrationTest.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/tests/phpunit/devices/DeviceDetectorServiceIntegrationTest.php 
b/tests/phpunit/devices/DeviceDetectorServiceIntegrationTest.php
index 6eddf62..1db81d3 100644
--- a/tests/phpunit/devices/DeviceDetectorServiceIntegrationTest.php
+++ b/tests/phpunit/devices/DeviceDetectorServiceIntegrationTest.php
@@ -51,6 +51,7 @@
        }
 
        public function test_it_should_handle_requests_from_mobile_UAs() {
+               $this->setMwGlobals( 'wgMFAutodetectMobileView', true );
                $this->whenTheRequestIsFromAMobileUA();
 
                $properties = $this->detectDeviceProperties();
@@ -60,6 +61,7 @@
        }
 
        public function test_it_should_handle_a_request_from_desktop_browsers() 
{
+               $this->setMwGlobals( 'wgMFAutodetectMobileView', true );
                $properties =  $this->detectDeviceProperties();
 
                $this->assertFalse( $properties->isMobileDevice() );
@@ -67,6 +69,7 @@
        }
 
        public function test_it_should_prioritize_the_custom_request_header() {
+               $this->setMwGlobals( 'wgMFAutodetectMobileView', true );
                // @codingStandardsIgnoreStart
                // The custom header //should// either be M or ZERO, per
                // 
<https://github.com/wikimedia/operations-puppet/blob/2a2714c28eab25eed469375dc5322ea6a6ef85df/modules/varnish/templates/text-frontend.inc.vcl.erb#L74-L78>.
@@ -84,6 +87,7 @@
         * @FIXME Should this really be the case?
         */
        public function 
test_it_should_prioritize_the_amf_environment_variables() {
+               $this->setMwGlobals( 'wgMFAutodetectMobileView', true );
                $this->request->setHeader( 'X-Subdomain', 'M' );
 
                $this->server[ 'AMF_DEVICE_IS_TABLET' ] = 'true';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7f20ea0a89d2ab8e1510a4662132fe244c9fd66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

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

Reply via email to