From a8c157a0a2a885a82e318c7de3683344e3190851 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 23 Dec 2013 13:48:21 -0500 Subject: [PATCH] Fix mediawiki-core-regression-master The Interwiki class caches lookups, so ApiQueryTest.php's use of "en:" was failing for mediawiki-core-regression-master because something else had already made a call for that prefix. The easy fix is to use a different prefix that is very unlikely to ever be used in a different test. Change-Id: I43ca554d5b5465d760eae03d1f76b8c3bf589210 --- tests/phpunit/includes/api/query/ApiQueryTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/includes/api/query/ApiQueryTest.php b/tests/phpunit/includes/api/query/ApiQueryTest.php index 17da9a1fa0..ea0b3235ab 100644 --- a/tests/phpunit/includes/api/query/ApiQueryTest.php +++ b/tests/phpunit/includes/api/query/ApiQueryTest.php @@ -21,7 +21,7 @@ class ApiQueryTest extends ApiTestCase { // Setup en: as interwiki prefix $this->hooks = $wgHooks; $wgHooks['InterwikiLoadPrefix'][] = function ( $prefix, &$data ) { - if ( $prefix == 'en' ) { + if ( $prefix == 'apiquerytestiw' ) { $data = array( 'iw_url' => 'wikipedia' ); } return false; @@ -114,10 +114,10 @@ class ApiQueryTest extends ApiTestCase { array( 'x', NS_MAIN, 'X', false ), array( 'y ', NS_MAIN, 'Y_', false ), array( 'template:foo', NS_CATEGORY, 'Template:foo', false ), - array( 'en:foo', NS_CATEGORY, 'En:foo', false ), + array( 'apiquerytestiw:foo', NS_CATEGORY, 'Apiquerytestiw:foo', false ), array( "\xF7", NS_MAIN, null, true ), array( 'template:foo', NS_MAIN, null, true ), - array( 'en:foo', NS_MAIN, null, true ), + array( 'apiquerytestiw:foo', NS_MAIN, null, true ), ); } } -- 2.20.1