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 |
||
|---|---|---|
| .. | ||
| classes | ||
| converters | ||
| LanguageClassesTestCase.php | ||
| LanguageConverterFactoryTest.php | ||
| LanguageConverterIntegrationTest.php | ||
| LanguageConverterTest.php | ||
| LanguageConverterTestTrait.php | ||
| LanguageFallbackStaticMethodsTest.php | ||
| LanguageIntegrationTest.php | ||