| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Change-Id: I86fc55a4fc8ceafe368692173211bbcd6d8581d7
|
|
|
|
|
| |
Bug: T241350
Change-Id: Icdb2512f3ec10bc4b26a6faa08f14d7603176c82
|
|
|
|
|
|
|
| |
Once again, this fixes all issues aside from assertArraySubset.
Bug: T192167
Change-Id: I45c91dc1cf23f04140576dc66233558bb6021324
|
|
|
|
|
|
|
|
|
|
| |
It would get confused by URLs with a query portion but no path.
We no longer support any vulnerable versions of PHP, but it would still
be useful to have these tests.
Bug: T212067
Change-Id: I15c15161a668115d68eb2e2f8004826b47148fc1
|
|
|
|
|
|
| |
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
assertEquals( false, … ) still succeeds when the actual value is 0, null,
an empty string, even an empty array. All these should be reported as a
failure, I would argue.
Note this patch previously also touched assertSame( false ). I reverted
these. The only benefit would have been consistency within this codebase,
but there is no strict reason to prefer one over the other. assertFalse()
and assertSame( false ) are functionally identical.
Change-Id: Ic5f1c7d504e7249002d3184520012e03313137b4
|
|
|
|
| |
Change-Id: If6cbdec05b8f310ef3a0b4649aaa16d9fb80a047
|
|
|
|
|
|
|
|
|
|
|
| |
Now that resetServices() will preserve (but reset) customized services,
it should be reasonably safe to call it every time globals are changed,
and much more effective than relying on tests to call it every time
themselves.
Depends-On: Iab8ea3a61bbc6803805d855ef23c071067646f71
Depends-On: I00e35ecea6a27468674b2a6e7d9d9eb6518e3bd5
Change-Id: Ie7a89f6ed7d52a0bc01672019ff92e7ee105a1f3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think this probably shouldn't be directly in the MediaWiki namespace,
but I don't know where is a better place to put it.
In order to avoid gratuitous use of TitleFormatter, I changed the cache
format -- the old implementation used getPrefixedDBkey() and I switched
to an ns/dbkey pair. I also changed the cache keys to use SHA1 instead
of MD5, by Daniel's request.
The previous implementation cached the parsed blacklist for one minute
without invalidation, so it could return slightly stale results, but it
didn't retrieve the bad image list message on a cache hit. The new
implementation unconditionally retrieves the bad image list message, but
uses a hash of it in the cache key and caches for one day. The new
behavior happens to be more cleanly implementable in a service.
Bug: T200882
Bug: T139216
Change-Id: I69fed1b1f3cfc1aa149e0739780e67f6de01609d
|
|
|
|
|
|
|
| |
In preparation for rewriting as a service. I didn't figure out how to
get file redirects to be tested.
Change-Id: Ic6669a19a13025744036f9f8adc4d1a25490fb42
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only extension that used this was ConfirmEdit and it has been
cleaned up with Ia7b276ee65fdf58c, so is it time we hard deprecate
it?
Usage
=====
https://codesearch.wmflabs.org/search/?q=%5CbwfGlobalCacheKey%5Cb&i=nope&files=&repos=
Depends-On: Ia7b276ee65fdf58c4fc0859563930528d44a03ca
Change-Id: I3fda797c64ec62df4454625ad1a3bf89f6a88246
|
|
|
|
|
|
|
| |
That mostly enables testing global functions
Bug: T87781
Change-Id: Ib42c56a67926ebcdba53f4c6c54a5bff98cb77a3
|
|
|
|
|
|
|
|
|
|
|
|
| |
Anonymous pipe under Windows does not support asynchronous read and write[1],
and the default buffer is too small (~4K), the test will definitely block it.
Before T69870, anonymous pipe for Windows can no longer hold more than 4K of data.
[1] https://docs.microsoft.com/en-us/windows/desktop/ipc/anonymous-pipe-operations
Bug: T209159
Change-Id: Ie9de36b1e6b68db95c35a0044c5b0d86c0050d33
|
|
|
|
| |
Change-Id: I0c83783051bf35fe785bc01644eeb2946902b6b2
|
|
|
|
|
|
|
|
| |
This reverts commit 0a2b996278e57a8b8c5377cd3a3eaa54f993d4a9.
Reason for revert: Broke postgres tests.
Change-Id: I27d8e0c807ad5f0748b9611a4f3df84cc213fbe1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset implements T89432 and related tickets and is based on exploration
done at the Prague Hackathon. The goal is to identify tests in MediaWiki core
that can be run without having to install & configure MediaWiki and its dependencies,
and provide a way to execute these tests via the standard phpunit entry point,
allowing for faster development and integration with existing tooling like IDEs.
The initial set of tests that met these criteria were identified using the work Amir did in
I88822667693d9e00ac3d4639c87bc24e5083e5e8. These tests were then moved into a new subdirectory
under phpunit/ and organized into a separate test suite. The environment for this suite
is set up via a PHPUnit bootstrap file without a custom entry point.
You can execute these tests by running:
$ vendor/bin/phpunit -d memory_limit=512M -c tests/phpunit/unit-tests.xml
Bug: T89432
Bug: T87781
Bug: T84948
Change-Id: Iad01033a0548afd4d2a6f2c1ef6fcc9debf72c0d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces confidence in the test. There is no guruantee that
it won't return the same value twice during the duration of a full
PHPUnit run of all test suites, whether twice in a row or 20 minutes
apart.
For a test that needs a string of any kind, use an explicit, consinstent
and cheap literal value.
For a test that specifically needs some kind of uniqueness compared to
something else within the same test case, do so explicitly.
Tests that require something globally unique (for some undefined/vague
definition of "global") were not found, and should not exist anyway.
Also, in libs/objectcache tests, fix order of parameters in some
assertions (expected first, then actual), and use assertFalse/assertSame
instead of assertEqual for cases where false is expected to remove
tolerance of other loosely equal values.
Change-Id: Ifc60e88178da471330b94bfbf12e2731d2efc77d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions were hard deprecated in 1.32 and usage no longer exist
and seems to have been completely removed from all repos. See below;
Usage
=====
https://codesearch.wmflabs.org/search/?q=%5B%5E%3E%5D(wfArrayFilterByKey%5C(%7CwfArrayFilter%5C()&i=nope&files=&repos=
Bug: T42485
Change-Id: I28092eeb8dec058c5dba2fb63f3602249c137b31
|
|
|
|
|
|
|
| |
These are services, so tests should just override services to reset
them.
Change-Id: Icb1a041f8fac1ea0b7421e69b7b31b24171d868b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a method to LinkFilter to build the query conditions necessary
to properly use it, and adjusts code to use it.
This also takes the opportunity to clean up the calculation of el_index:
IPs are handled more sensibly and IDNs are canonicalized.
Also weird edge cases for invalid hosts like "http://.example.com" and
corresponding searches like "http://*..example.com" are now handled more
regularly instead of being treated as if the extra dot were omitted,
while explicit specification of the DNS root like "http://example.com./"
is canonicalized to the usual implicit specification.
Note that this patch will break link searches for links where the host
is an IP or IDN until refreshExternallinksIndex.php is run.
Bug: T59176
Bug: T130482
Change-Id: I84d224ef23de22dfe179009ec3a11fd0e4b5f56d
|
|
|
|
|
|
|
| |
Fix testDebugFunctionTest() so that it works when LocalSettings.php
sets $wgMWLoggerDefaultSpi
Change-Id: I5e573b0ce1ce037c3505d3b44d9710395c9af8d6
|
|
|
|
| |
Change-Id: Ic6fbc5e14b1a756f62dd6cc3a6b2acc0d47db498
|
|
|
|
| |
Change-Id: I3b4594dab0aba659cc47233f7be3da751066b7de
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When expanding a URL, don't overwrite an explicitly specified port or
add a port to a foreign URL. $wgHttpsPort is only useful for a very
specific case: when $wgServer is protocol-relative and HTTPS is
requested.
Documented correct use of $wgHttpsPort in DefaultSettings.php. Fixed
invalid "@see", in Doxygen it can only point to "classes, functions,
methods, variables, files or URL".
Added test cases which previously failed.
Change-Id: Id65c58300d22712212b6605711ff916916e8768b
|
|/
|
|
|
|
|
|
|
| |
Now that all our supported PHP versions have array_filter()
with a third parameter, these functions aren't needed anymore.
Depends-On: I3b097a1a048baabcaca15dc214a3a1bb06e746cc
Depends-On: I0187e27ac47cbab099249572201d1a649226a734
Change-Id: I7cabd0252691a083cb749cf9d3a7a23f1d076c39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
|
|
|
|
| |
Change-Id: I59b59f79bbf3ce4feff3b3a20c1c31bc16370531
|
|
|
|
|
| |
Bug: T182273
Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
|
|
|
|
| |
Change-Id: I6565ad21b6d6e78d876f730596e213555143c3fc
|
|
|
|
| |
Change-Id: I7e65c1734aef01cd6395ee65204a0158d1635b0c
|
|
|
|
|
|
|
|
|
|
|
| |
This patch extends the global wfMerge function to also return the
result of the first merge attempt that detects merge conflicts.
The additional output explicitly names the conflicting lines and
could help when solving edit conflicts.
Bug: T151320
Change-Id: I97acebdc87b31779200c7fde4dd4449cd1ee8ead
|
|
|
|
|
|
|
|
|
|
| |
There is code in several places in extensions which converts
setting or parameter string (such as "true", "yes", "false", "no")
to boolean. Since we already have the code that does in global
functions in wfStringToBool(), it makes sense to expose this code
and reuse it.
Change-Id: I88d98b012ff4bf14fd64a05a9135a6e75cf2d4e7
|
|
|
|
|
|
| |
Deprecate global function wfBCP47.
Change-Id: Ie6bb061b5d6ca67289bb18bc468a87421f38fc94
|
|
|
|
| |
Change-Id: Iefaae5043fa77d5d556c31079549dab8f61bd3ef
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And allow extensions to add their own media handlers.
I'm not too happy with the introduction of another global,
but didn't like the alternatives either:
* Add some hook to MockMediaHandlerFactory that would allow
extensions to add their own stuff in.
* Use another hook (like ParserTestTables or ParserTestGlobals)
and then override the service with a new instance - seemed
too hacky
The good thing about this is that it lets us kill off a class.
I'm other to other suggestions in case I missed something.
Bug: T169258
Depends-On: I5875621c58597426ad5242bf3d07714555c439b5
Change-Id: I1c2e903fb235395a8de8e0f7bf65ce07739d2930
|
|
|
|
|
|
| |
Organize phpcs.xml a bit
Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
|
|
|
|
|
|
|
|
|
|
|
|
| |
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168
Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||
Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have several types of change lists (old RC/watchlist/related
changes, enhanced RC/watchlist, history) with slightly different
HTML, each with their own idiosyncracies. JavaScript code trying
to identify lines by log ID / revision ID has to jump through all
kinds of hoops to work with that.
To simplify the lives of frontend / gadget maintainers and provide
something approaching an API for these pages, we now expose the basic
attributes of each change line (revision ID for edits, log type/action
and ID for log events) as data attributes.
The OldChangesListRecentChangesLine, EnhancedChangesListModifyLineData,
EnhancedChangesListModifyBlockLineData, PageHistoryLine,
ContributionsLineEnding and DeletedContributionsLineEnding hooks
are updated accordingly. New hooks (LogEventsListLineEnding and
NewPagesLineEnding) are added for the change list pages which did
not yet have them.
Change-Id: I6dd006d0b1b0fd35c0020f0f9eea9113eca30b35
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a service to represent wfReadOnly() and friends.
It's necessary to have two service instances, one for wfReadOnly() and
one for wfConfiguredReadOnlyReason(), to avoid a circular dependency,
since LoadBalancer needs the configured reason during construction, but
wfReadOnly() needs to query the currently active load balancer.
Not having a cache of the configuration makes it possible to dynamically
change the configuration. Ideally things would not change the
configuration, and I removed such instances in core, but to support
extensions, I added a test ensuring that the configuration can be changed.
Change-Id: I9bbee946c10742526d3423208efd68cb3cc5a7ee
|
|
|
|
| |
Change-Id: Id92aab0b1f8cde6657d6558d0d82605109daa588
|
|
|
|
|
|
|
| |
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I46261416f7603558dceb76ebe695a5cac274e417
|
|
|
|
|
|
|
|
|
| |
This is a pure documentation change. It mostly removes empty lines from
comments (and entirely empty comments), as well as adds a few missing
documentation blocks and fixes a minor mistake. I hope it's ok to have
this in one patch. I can split it, please tell me.
Change-Id: I9668338602ac77b903ab6b02ff56bd52743c37c4
|
|
|
|
|
|
| |
http://tools.ietf.org/ redirects to https://tools.ietf.org/
Change-Id: Ia45d2ce80399e1c9172e0924abd6bf794a53122f
|
|
|
|
| |
Change-Id: Ie39fd9243e7817191b87179f792d932f7b96de0c
|
|
|
|
| |
Change-Id: I86c73cb9447ac562a73348b4030e24ebf49a90dc
|
|
|
|
| |
Change-Id: Icb99d5479836fea25a47451b5a758dd71f642f71
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RFC 3066 is obsoleted by RFC 4646.
* RFC 4646 is obsoleted by RFC 5646.
* All are also known as BCP 47.
* Language codes must treated as case insensitive.
* There exist conventions for the capitalization of some of the subtags.
* Write a space between BCP and 47 in comments.
* http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart1.pdf is not available.
* https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMP%20SDK%20Release%20cc-2014-12/XMPSpecificationPart1.pdf
is the new position.
Change-Id: I91e305fd5754cf4dedf8fd7460f7d3375f792c89
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
|
|
|
|
|
|
| |
This method actually marks the test it is called
from as skipped if Diff3 is not confugured.
The new name "markTestSkippedIfNoDiff3" better
reflects that.
Change-Id: I1dffeba0aceb312b3a82216f0b55227e24bc2e34
|