| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T353458
Change-Id: I35864ad9bd48701703c51367d62f8ebde963c52d
|
|
|
|
|
|
|
|
|
|
|
| |
https://docs.phpunit.de/en/11.4/annotations.html#covers recommends:
> Please note that this annotation requires a fully-qualified class
> name (FQCN). To make this more obvious to the reader, it is
> recommended to use a leading backslash (even if this not required for
> the annotation to work correctly).
Change-Id: I7eb4b997346387e5799fa27a61ab317573124fd0
|
|
|
|
|
|
|
|
| |
Changes to the use statements and some additions
are done automatically via script
This also updates @covers tag for the namespaced classes
Change-Id: I859ba6d05018c99710b744e2becab432410d3bca
|
|
|
|
|
| |
Bug: T353458
Change-Id: If0137003ab625017d322d57870448a02569668c3
|
|
|
|
|
| |
Bug: T353458
Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
|
|
|
|
|
| |
Bug: T357823
Change-Id: I0d7cc2c9b166d5e5b913c1305f7cee017fe377af
|
|
|
|
| |
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
|
|
|
|
|
| |
Bug: T342301
Change-Id: I5ea01f7ee103570165261bde0965c5b65e04c369
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parsing titles is expensive, it happens in the test function itself via
Title::newFromText and also the called editPage() needs to parse the
title, better to pass the title object there.
Title::newFromText has a cache, that share the title object between the
api code and the test code.
Use independent title objects for testing. This requires some
Title::READ_LATEST to ensure the changed database after the api call is
used.
Change-Id: I00c14e270a5f4078f80d78696ca2e39acf138e95
|
|
|
|
|
|
|
| |
Ideally we'd use Authority, but that doesn't always work, so just call
the getTest* methods directly.
Change-Id: I7f8393bb754beeb319b5555b5dac05265e376a22
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error messages are not guaranteed to be stable, and these tests
prevent us from improving them.
Error codes are supposed to be stable, so we should be asserting
that they do not change (especially since many of them are
dynamically generated by the dodgy code in ApiMessageTrait).
Introduce helpers assertApiErrorCode() and expectApiErrorCode()
to be used instead of the usual PHPUnit assertions/expectations
for this case.
Change-Id: I752f82f29bf5f9405ea117ebf9e5cf70335464ad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
|
|
| |
And WikiReference
Bug: T321882
Change-Id: I60cf4b9ef02b9d58118caa39172677ddfe03d787
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|
|
|
|
|
| |
overrideConfigValues is documented to reset services as well
Change-Id: Ie13a699f6cd912b912d34adb97704bab3cbdff2d
|
|
|
|
|
|
|
| |
This patch covers: tests/phpunit/includes/actions/ and
tests/phpunit/includes/api/.
Change-Id: I60d8fb7b8a63b423606db935fa0d24cf859b2512
|
|
|
|
|
|
|
|
| |
The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().
Bug: T298059
Change-Id: I22d96b7aec17323d15a9bc401d4511ad2ee14165
|
|
|
|
| |
Change-Id: Ic3009b368b38d307d00dc3bec5c8d46b2dc97f83
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
The following sniffs now pass and were enabled:
* Generic.ControlStructures.InlineControlStructure
* MediaWiki.PHPUnit.AssertCount.NotUsed
npm:
* svgo: 2.3.0 → 2.3.1
* https://npmjs.com/advisories/1754 (CVE-2021-33587)
Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
|
|
|
|
|
|
|
| |
This change doesn't change any UI messages.
Bug: T54687
Change-Id: Ia62899a2a6fe8910618c35cd667291e397ddb055
|
|
|
|
| |
Change-Id: I7b2016162e86b455c0102742751981c44d7e829c
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces an ApiWatchlistTrait that refactors out common code
across APIs that allow you to watch pages. Some methods have been
migrated from ApiBase and changed completely, but codesearch suggests
they aren't being used outside the API modules in this patch.
Bug: T248512
Bug: T248514
Change-Id: Ia18627b9824dca81f44f0571e8420d89b7626cf6
|
|
|
|
| |
Change-Id: I636be48eb9f713680abac35d46091f7b49374696
|
|
|
|
|
|
| |
Bug: T192167
Depends-On: I581e54278ac5da3f4e399e33f2c7ad468bae6b43
Change-Id: I3a21fb55db76bac51afdd399cf40ed0760e4f343
|
|
|
|
|
|
|
|
|
|
|
| |
Find: ^(\t*)(\$this->)setExpectedException\(\s+(\\?[a-z\\]+::class),\s+('(?:[^'\\]|\\')+'|"(?:[^"\\]|\\")+")\s+\);
Replace: $1$2expectException( $3 );\n$1\$this->expectExceptionMessage( $4 );
+broke long lines manually.
Bug: T192167
Change-Id: I5557b4372625def55a53ac637c2f980f51f12933
|
|
|
|
|
| |
Bug: T28169
Change-Id: I923bf82d07db0efce1d0d14cf04e15bb58472f59
|
|
|
|
|
|
|
| |
Having *TestCase at end of the class name makes it easier to detect it
as TestCase class
Change-Id: Ic7ae7328e729c0f2d97afcf7c5be793d6a8df58f
|
|
|
|
|
| |
Bug: T182273
Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
|
|
|
|
| |
Change-Id: Ida0f954cb0a44719af3a3d0c6bda4587c9ca42b6
|
|
|
|
|
|
|
|
| |
Although the test is still might fail from time to time
and needs refactoring.
Bug: T28169
Change-Id: Ib27a36e0d76495a133eb8941300e4940e5eb670e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
API warnings and error messages are currently hard-coded English
strings. This patch changes that.
With a few exceptions, this patch should be compatible with non-updated
extensions:
* The change to ApiBase::$messageMap will blow up anything trying to
mess with it.
* The changes to the 'ApiCheckCanExecute' hook will cause a wrong
(probably unparsed) error message to be emitted for extensions not
already using an ApiMessage. Unless they're currently broken like
Wikibase.
Bug: T37074
Bug: T47843
Depends-On: Ia2b66b57cd4eaddc30b3ffdd7b97d6ca3e02d898
Depends-On: I2e1bb975bb0045476c03ebe6cdec00259bae22ec
Depends-On: I53987bf87c48f6c00deec17a8e957d24fcc3eaa6
Depends-On: Ibf93a459eb62d30f7c70d20e91ec9faeb80d10ed
Depends-On: I3cf889811f44a15935e454dd42f081164d4a098c
Depends-On: Ieae527de86735ddcba34724730e8730fb277b99b
Depends-On: I535344c29d51521147c2a26c341dae38cec3e931
Change-Id: Iae0e2ce3bd42dd4776a9779664086119ac188412
|
|
|
|
| |
Change-Id: Ib44c66492e27516dfe205a5e428ebfd6b0fcdfd9
|
|
|
|
| |
Change-Id: I5d3a5eb8adea1ecbf136415bb9fd7a162633ccca
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
None of this works and it's been long begging for a mercy kill.
All it does is waste contributor time on updating deprecations
in the dead code. I imagine we wouldn't reuse much of this
code if we're ever going to reimplement it.
Bug: T119336
Change-Id: Ibd26a4bea621857aac77823017e9be9b7dc52cca
|
|
|
|
|
|
|
|
| |
Changed some old bugzilla links to new phabricator links in comments,
test data and error message. This reduces the need for redirects from
old bugzilla to new phabricator from our source code.
Change-Id: Id98278e26ce31656295a23f3cadb536859c4caa5
|
|
|
|
| |
Change-Id: Iec47ea2609b4d407e827cec5bf2a834b75727005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
|
|
|
|
|
|
|
|
|
|
| |
* Remove redundant @licence/@license from test suite files.
They already have full licence headers. And @licence raises a
warning in Doxygen.
* Fix weird messes of comments inside comments and other things.
Change-Id: I38da8ca76330f72b8dc22b0ecf1ea69d5ea55ede
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use MediaWikiTestCase::getNewTempFile and getNewTempDirectory
instead of wfTempDir().
The upload api tests wrote a tempnam() file directly (where
wfTempDir() is typically shared with other systems and concurrent
runs). Use MediaWikiTestCase::getNewTempFile and
getNewTempDirectory instead.
This also ensures its removal by the teardown handler without
needing manual unlink() calls. And it doesn't rely on the test
passing. (Many unlink calls where at the bottom of tests,
which wouldn't be reached in case of failure).
* For the upload test, the presistent storing of
'Oberaargletscher_from_Oberaar.jpg' (downloaded from Commons)
was removed. Note that this didn't work for Jenkins builds anyway
as Jenkins builds set $wgTmpDirectory to a unique directory
in tmpfs associated with an individual build.
* For filebackend tests, moved directory creation from the dataProvider
to the main test.
Implemented addTmpFiles() to allow subclasses to register
additional files (created by other means) to be cleaned up also.
Removed unused $tmpName and $toPath parameters in data
provider for FileBackendTest::testStore. And fixed weird double
$op2 variable name to be called $op3.
* Skipped parserTest.inc, MockFileBackend.php, and
UploadFromUrlTestSuite.php as those don't use MediaWikiTestCase.
Change-Id: Ic7feb06ef0c1006eb99485470a1a59419f972545
|
|
|
|
| |
Change-Id: If6d0a72acb98e0971fcce2facb239b67cbe639a5
|
|
|
|
| |
Change-Id: I138c1f9bf2c3c7e9218d5fa29365e78b309fb459
|
|
|
|
| |
Change-Id: I690645cd8a9b1165dcc8271b201c695ea9391226
|
|
|
|
|
|
| |
Style Fixes, Comment fixes
Change-Id: I675d3f098e81709d5dfd928af6ca54589d3d5fad
|
|
|
|
|
|
| |
api tests require either @group medium or @group large
Change-Id: Iea65c4856579690de234a2a8c01669b282a265f3
|
|
|
|
|
|
|
|
| |
- Removed trailing spaces in comments
- Removed multiple empty lines
- Removed space after object operator
Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
|
|
|
|
| |
Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af
|
|
|
|
|
|
|
|
| |
Per the code conventions ([[mw:CC/PHP]]).
This file appears to be the only outlier.
Change-Id: I634d9927174737ffc99976a97a41ce04c842fc32
|