wiki.techinc.nl/tests/phpunit/languages
Tim Starling 6b2a52181f Don't access $wgRequest from User
Some User methods fail if they are called before $wgRequest is
set. But according to the Setup.php comment, it is only set for b/c.
The global request object can be lazy-initialised at any time.

This is sufficient to avoid T263911 (loss/obfuscation of the $wgServer
error message).

In tests, try to keep $wgRequest and RequestContext::$request in sync.
Introduce MediaWikiIntegrationTestCase::setRequest() which sets both at
once, and use that instead of setMwGlobals() or direct assignment.

BlockManagerTest was accidentally exploiting the fact that the global
context request and $wgRequest were separate objects. Making them the
same causes session cookies to appear in the response, breaking the
cookie counts. Use a new response for the test.

Bug: T263911
Bug: T245940
Change-Id: I2be99f7251a837bc6b62be0b152038157dec10f2
2020-12-16 12:21:00 +11:00
..
classes Use Unicode minus in output of {{formatnum}} 2020-11-16 18:08:31 +00:00
converters MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
LanguageClassesTestCase.php MediaWikiTestCase to MediaWikiIntegrationTestCase 2020-06-30 17:02:22 +01:00
LanguageConverterFactoryTest.php Replace $wgDisable{Lang,Title}Conversion with LanguageConverterFactory methods 2020-11-25 12:47:26 -05:00
LanguageConverterIntegrationTest.php Replace $wgDisable{Lang,Title}Conversion with LanguageConverterFactory methods 2020-11-25 12:47:26 -05:00
LanguageConverterTest.php Don't access $wgRequest from User 2020-12-16 12:21:00 +11:00
LanguageConverterTestTrait.php Replace $wgDisable{Lang,Title}Conversion with LanguageConverterFactory methods 2020-11-25 12:47:26 -05:00
LanguageFallbackStaticMethodsTest.php Fix languages/ PSR12.Properties.ConstantVisibility.NotFound 2020-05-16 21:49:02 +01:00
LanguageIntegrationTest.php Merge "languages: Language::formatNum() should accept any valid number" 2020-11-23 20:54:40 +00:00