This helps preventing mistakes, for example if you don't know or you
forget to generate the sql schema for one or all of them.
Also it helps preventing malicious changes to the generated files that
might go in without much scrutiny as the manual files.
Bug: T252919
Change-Id: I50e2715a55914f7712f9925c149bd09e8265a20b
Note that some (not all) of these are flipped, listing the expected
value second. I guess this is because it's like this in QUnit.
This patch also replaces loose assertEquals() checks with the more
strict assertSame(), which should be preferred when comparing strings.
Change-Id: I5bb27a6b63ab1642fab60483647d6b663100b144
Some entries in mime.info used runs of spaces instead of tabs to
separate the list of MIME types from the media type field, and the
mime.info code handled that incorrectly. This led to us treating the
empty string as a valid MIME alias for application/sla.
Fix that by splitting on /\s+/ rather than ' '. Also made tab usage in
mime.info uniform. I'd document the convention, but I plan on nuking
mime.info in a forthcoming changeset anyway.
Bug: T252228
Change-Id: I06c733b54fd622280ea67e206340598605cb6958
In Wikitext this will end up in [[Link]] being converted to a link.
In comments this is ignored prior to this patch.
Bug: T197958
Change-Id: I454d342a57c35c30af042349a04e3b86d778568f
Add a HookRegistry interface and two concrete implementations,
representing HookContainer's view of its environment. This simplifies
creation of a HookContainer for testing.
Add MediaWikiTestCaseTrait::createHookContainer() which can be used
in most of the places that were previously creating mock hook
containers. It can also replace setTemporaryHook() in some cases.
Change-Id: I9ce15591dc40b3d717c203fa973141aa45a2500c
Integration test for HookContainer.
Tests that hook handlers registered in extension.json
and through HookContainer::register() are executed.
Bug: T251444
Change-Id: I552ae606794d4482f7e8a4b0b67fd35b302e43f8
This is not really a manager, since it only supports
reading defaul options. Inroduced in 1.35 and not yet
used outside of core, so no deprecations are needed.
Change-Id: If67af54574d9c2e44ed85d1bdd098afd0a21e8f9
This was deprecated in hooks.txt as deprecated in 1.27 but never actually
hard-deprecated.
Bug: T232880
Change-Id: I2195f672a44ae107937c61718f9ef19073db169f
The new HookContainer.php introduces a scopedRegister() method for
temporarily setting hooks. Let's use that in MediaWikiUnitTestCase
and MediaWikiIntegrationTestCase instead of directly accessing
global $wgHooks to do so.
Also introduces setTemporaryHook() and removeTemporaryHook()
methods in MWIntegrationTestCase for easily adding/removing of
temporary hooks.
Bug: T250300
Change-Id: I8cefd41b66f882c53646b76de76c51f0d8730f72
Currently, when trying to automatically generate the schema, it
majestically explodes because "NULL" is not equal to "null".
Change-Id: I0facf313525eee1af31fdb307368ecf3bdda895b
This is part of refactoring skin code to allow us to move away
from SkinTemplate.
Move BaseTemplate functions to skin and soft deprecate them
to avoid compatiblity issues so they can be used inside the
Skin class by skins not using BaseTemplate
Note to reviewers:
The function bodies are copied without modification to Skin
with the following exceptions:
1) A phan comment is dropped and the only change.
2) wfMessage is replaced with msg
See I7a14f74728703c50874935e9d77b35ad9434b436 for a
bigger picture view of how
this would simplify Vector's codebase
Update function of `getStructuredPersonalTools`
to not use SkinTemplate
Bug: T251212
Depends-On: Ifd9bbc9c909626ecfe8ccd085673bc777423d560
Change-Id: I99c7cebc277cb0680ab369c78f02ab370193d5c5
This existed on MediaWikiIntegrationTestCase, but not on
MediaWikiUnitTestCase. As a result of that, I spent about four
days tracking down a dangling AtEase::suppressWarnings with
missing AtEase::restoreWarnings (as part of Ib6758d724c).
Move it to the common MediaWikiTestCaseTrait instead so that we
get it on unit/ as well.
Example:
> There was 1 failure:
>
> 1) Pbkdf2PasswordTest::testCryptThrows
> PHP error_reporting setting found dirty.
> Did you forget AtEase::restoreWarnings?
Change-Id: I7dc3fe90385c8066b89a5e06c55f5455edfbb4ca