And use it in core
Avoid direct use of super global $_FILES
This can breaks all FauxRequest relaying on $_FILES
in tests or production code via FauxRequest::getUpload.
Falls back to $_FILES for the moment
Bug: T48163
Change-Id: I7392acc9bb682ec6b7025dbed0734c142f45c91a
Adding it (only to be removed later) is not useful and interferes with
the internals of the schema builder because it masks the actual table
name during the table sql building and at some stages, this actual name
is required to be known
Bug: T191231
Change-Id: I57cc9b83c81f5c2d0d50c7b9e0dc334e7251c74f
Still needs to downcast to WikiPage in 2 places:
1. To check get a ContentHandler and check if content model
is cacheable. We probably should just make all content models
cacheable.
2. To call WikiPage::triggerOpportunisticLinksUpdate. I have
an elaborate plan for this one, but it will be done separately.
Change-Id: Ifd9ab0155dc1fad0c1608dafea05d16292afd057
ParserOptions not updated cause they depend on Title::getLanguage
implementation.
Tests converted to not require a DB anymore. Can't be proper unit
tests yet due to globals in ParserOptions and fake time hacks,
but exec time does go down from 70 seconds to 9 seconds.
Page content model is still emitted in the metrics since
it was considered useful. Should be removed when we get
something like a page type concept.
Change-Id: Ib16fd0b5b87ffc3cb4d21f4aa43d1203cb7206d2
Key coalescing hints are now unconditionally enabled, using
the mcrouter style by default. This can be changed by setting
"coalesceScheme" (e.g. in case of experimental dynomite use).
Change-Id: I4866ed66d42d7d7da2b3edc2f99b8ba35fe3d511
Currently both email and real name are documented as
non-nullable, but it seems there's code that breaks
this contract. Try stricter type checks.
Depends-On: Ie8fa1e7881e1b016dccdc9097a1763a07cc140b9
Depends-On: Id3bf35fe56c459597ed6a602bdf6ca4860271f6e
Change-Id: I2f4b7b3500a2b25f7d5cf25147f65ad412d61955
Same as I3d8c6f6 already did for two other methods. It looks like this
one was forgotten.
This patch also adds tests for the previously untested method
Title::getSkinFromConfigSubpage().
Note this patch changes the behavior of Title::getSkinFromConfigSubpage()
slightly. It will return an empty string much more often. This is not a
breaking change as far as I can tell. According to
https://codesearch.wmflabs.org/search/?q=getSkinFromConfigSubpage%5C(
there are only two known callers, and both guarantee the string passed to
this method contains both a slash and a dot. Returning an empty string in
all other cases is much closer to the original intent of the method. For
example. "User:Vector" will not be considered a valid skin name any more.
Bug: T229443
Change-Id: I0a5be39ca11a4e5d6c05f70eb05e80c6c4980523
This is used quite a lot in the codebase and it's
a reason for a lot of usages of $wgLang. Time and date
seems generic enough to put into Message library -
we already have references to Wikimedia\Timestamp
library there.
Bug: T278482
Change-Id: If7cb5f5dcfa736b6530f731af9dc3af168812054
We can't really watch invalid titles, since they
definitely can not exist in the database, so having
them in user watchlist doesn't make much sence either.
Bug: T278735
Change-Id: I411ca9227da8050d026a57db690824afd3423a89
Creating any block class includes a call to AbstractBlock::setTarget
which uses MediaWikiServices, meaning that no blocks can
be created in unit tests. If the target is an empty string '', set
the target and type to null instead of using the BlockUtils
service, which would eventually set them to null but would require
using MediaWikiServices
Allows moving SystemBlockTest to a unit test
Change-Id: Icdf10a6b89aef1995b6e5b5cee9ba5dd5593b01e
Only testGetSlotDiffRenderer() requires integration
Clean up the code that is being moved, and fix
the remaining covers in the integration test
Change-Id: Ic5926b23daf6738c44d9a5aacb75276f81c51f7a
The control characters are presented as text, not actual
control characters, so the regexes to replace them are
incorrect.
Added a column and para to the Djvu text on the first page
of the test LoremIpsum.djvu file
Bug: T230415
Change-Id: I4970bc30b3935ce4da062ee7ff687aa667027a00
We can't avoid this entirely where we're testing upstream features
that are yet to be renamed, but this is a start.
Bug:T277986
Change-Id: I5c1ae717cc008ca147ea31fe35c44b19d1fe5d98
No integration is needed.
Additionally, change namespace to reflect that it's a test class
rather than normal code.
Change-Id: Iaa591310edde57de02c710ed1741388b4abafd01
No integration is needed.
Additionally, change namespace to reflect that it's a test class
rather than normal code.
Change-Id: Iaa05945805e3417ee149204b3e5b4085e6a06007
Extends PHPUnit\Framework\TestCase
and does not require any integration logic
Start new /tests/phpunit/unit/maintenance/
directory
Change-Id: I126dba699e829544a571bf795de6536a0ed9b977
Its a test for the ObjectFactory code that is underlying
the ContentHandlerFactory class, but that code is already
tested elsewhere extensively - these tests add nothing
for the library, and don't cover the actual ContentHandlerFactory
code either.
Change-Id: I74a141d592a2582be8f6b2b81a392e5eebc27ec4