Commit graph

81 commits

Author SHA1 Message Date
James D. Forrester
4ed5ca48b1 Follow-up 71ff05267: Stop writing to tablesUsed in tests, now unnecessary
Bug: T342301
Change-Id: I5ea01f7ee103570165261bde0965c5b65e04c369
2023-11-21 09:02:48 -05:00
C. Scott Ananian
0e1b889a0f [parsoid] Fix Parsoid relative links
Bug: T350952
Change-Id: I60165a9946a35cfb42a78ed2f833c34570fefffc
2023-11-16 16:28:55 -05:00
Timo Tijhof
d0a96db0f9 parser: Move lang/dir and mw-content-ltr to ParserOutput::getText
== Skin::wrapHTML ==

Skin::wrapHTML no longer has to perform any guessing of the
ParserOutput language. Nor does it have to special wiki pages vs
special pages in this regard. Yay, code removal.

== ImagePage ==

On URLs like /wiki/File:Example.jpg, the main output handler is
ImagePage::view. This calls the parent Article::view to handle most of
its output. Article::view obtains the ParserOptions, and then fetches
ParserOutput, and then adds `<div class=mw-parser-output>` and its
metadata to OutputPage.

Before this change, ImagePage::view was creating a wrapper based
on "predicting" what language the ParserOutput will contain. It
couldn't call the new OutputPage::getContentLanguage or some
equivalent as Article::view wouldn't have populated that yet.

This leaky abstraction is fixed by this change as now the `<div>`
from ParserOutput no longer comes with a "please wrap it properly"
contract that Article subclasses couldn't possibly implement correctly
(it coudln't wrap it after the fact because Article::view writes to
OutputPage directly).

RECENT (T310445):

A special case was recently added for file pages about translated SVGs.
For those, we decide which language to use for the "fullMedia" thumb
atop the page. This was recently changed as part of T310445 from a
hardcoded $wgLanguageCode (site content lang) to new problematic
Title::getPageViewLanguage, which tries to guestimate the page
language of the rendered ParserOutput and then gets the preferred
variant for the current user. The motivation for this was to support
language variants but used Title::getPageViewLanguage as a kitchen
sink to achieve that minor side-effect. The only part of this
now-deprecated method that we actually need is
LanguageConverter::getPreferredVariant().

Test plan: Covered by ImagePageTest.

== Skin mainpage-title ==

RECENT (T331095, T298715):

A special case was added to Skin::getTemplateData that powers the
mainpage-title interface message feature. This is empty by default,
but when created via MediaWiki:mainpage-title allows interface admins
to replace the H1 with a custom and localised page heading.

A few months ago, in Ifc9f0a7174, Title::getPageViewLanguage was
applied here to support language variants. Replace with the same
fix as for ImagePage. Revert back to Message::inContentLanguage()
but refactor to inLanguage() via MediaWikiServices::getContentLanguage
so that LanguageConverter::getPreferredVariant can be applied.

== EditPage ==

This was doing similar "predicting" of the ParserOutput language to
create an empty preview placeholder for use by preview.js. Now that
ApiParse (via ParserOutput::getText) returns a usable element without
any secret "you magically know the right class, lang, and dir" contract,
this placeholder is no longer needed.

Test Plan:

* EditPage: Default preview
  1. index.php?title=Main_Page&action=edit
  2. Show preview
  3. Assert <div class="mw-content-ltr mw-parser-output" lang=en dir=ltr>

* EditPage: JS preview
  1. Preferences > Editing > Show preview without reload
  2. index.php?title=Main_Page&action=edit
  3. Show preview
  4. Assert <div class="mw-content-ltr mw-parser-output" lang=en dir=ltr>
  5. Type something and 'Show preview' again
  6. Assert old element gone, new text is shown, and new element
     attributes are the same as the above.

== McrUndoAction ==

Same as EditPage basically, but without the JS preview use case.

== DifferenceEngine ==

Test:

1. Open /w/index.php?title=Main_Page&diff=0
   (this shows the latest diff, can do manually by viewing
   /wiki/Main_Page, click "View history", click "Compare selected revisions")
2. Assert <div class="mw-content-ltr mw-parser-output" lang=en dir=ltr>
3. Open /w/index.php?title=Main_Page&diff=0&action=render
4. Assert <div class="mw-content-ltr mw-parser-output" lang=en dir=ltr>

== Special:ExpandTemplates ==

Test:

1. /wiki/Special:ExpandTemplates
2. Write "Hello".
3. "OK"
4. Assert <div class="mw-content-ltr mw-parser-output" lang=en dir=ltr>

Bug: T341244
Depends-On: Icd9c079f5896ee83d86b9c2699636dc81d25a14c
Depends-On: I4e7484b3b94f1cb6062e7cef9f20626b650bb4b1
Depends-On: I90b88f3b3a3bbeba4f48d118f92f54864997e105
Change-Id: Ib130a055e46764544af0f1a46d2bc2b3a7ee85b7
2023-11-03 19:24:47 -04:00
Amir Sarabadani
cd2e19c050 tests: Use $this->getDb() instead of wfGetDB() in integration tests
Deprecated long time ago.

Bug: T330641
Change-Id: Ia57f12d350c3346029aafae25534c9ed262a7e98
2023-09-25 21:08:09 +02:00
James D. Forrester
94ece673b2 Namespace TitleValue under \MediaWiki\Title
One of the big ones, so doing this alone.

Bug: T166010
Change-Id: I4c901d5c32696d8334ec30cede7d9b6f3d8d645e
2023-09-18 18:24:39 +01:00
Máté Szabó
3f294751b2 ApiParse: Coerce image links to string
When ApiParse is used to parse a page containing numeric image links
like [[File:1]], those image links are returned in the "images" section
as numbers, not strings. This is due to a longstanding PHP feature where
numeric strings get converted into numbers when used as keys in an
associative array. So, coerce them back to strings.

While numeric image links seem rather useless, they still occur in the
wild, whether by design or by accident, and may break API consumers that
expect to deal with strings here.

Bug: T346265
Change-Id: I9bd3813afd1867d0ba9c7ef480ad5e6b062c1e94
2023-09-13 20:06:31 +02:00
Umherirrender
ddfcebc584 api tests: Call editPage() with WikiPage when used for same page
When calling editPage() with a string it converts it to a WikiPage each
time it is called. When edit a page only once that is okay,
but when adding more revision to the same page it is better to pass a
WikiPage instead to allow reuse of internal states of WikiPage to speed
up the tests

Bug: T225730
Change-Id: I7a0e7e3e75ade5d6abe8e62a03a029190f3b6da8
2023-06-24 18:07:34 +00:00
Umherirrender
d36073cdcf tests: Make some PHPUnit data providers static
Initally used a new sniff with autofix (T333745),
but some provide are defined non-static in TestBase class
and need more work to make them static in a compatible way

Bug: T332865
Change-Id: I889d33424f0c01fb26f2d86f8d4fc3de3e568843
2023-05-20 01:05:27 +02:00
Bartosz Dziewoński
1048db795b API tests: Assert error codes, not error messages
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
2023-04-26 19:36:29 +02:00
jenkins-bot
18c0986895 Merge "ApiParse: Add 'parsoid' option" 2023-03-27 08:09:18 +00:00
C. Scott Ananian
07a7ac0c88 ApiParse: Add 'parsoid' option
Allow requesting parsoid-format output from the action=parse API.

Change-Id: Iba9197491fd85e95b981206b63e43b470aac957c
2023-03-26 21:48:16 -04:00
Tim Starling
be3018b268 Just another 80 or so PHPStorm inspection fixes (#4)
* Unnecessary regex modifier. I agree with this inspection which flags
  /s modifiers on regexes that don't use a dot.
* Property declared dynamically.
* Unused local variable. But it's acceptable for an unused local
  variable to take the return value of a method under test, when it is
  being tested for its side-effects. And it's acceptable for an unused
  local variable to document unused list expansion elements, or the
  nature of array keys in a foreach.

Change-Id: I067b5b45dd1138c00e7269b66d3d1385f202fe7f
2023-03-25 00:39:06 +00:00
James D. Forrester
ad06527fb4 Reorg: Namespace the Title class
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
2023-03-02 08:46:53 -05:00
Umherirrender
9a96df31fa i18n: Reword action-deletedhistory
Also reword action-deleterevision, action-deletelogentry,
action-deletedtext and action-suppressrevision to match its
corresponding right-* messages

Bug: T329720
Change-Id: I3f0d9a76c5fb0dddb7de055b3cf2c335cd63e6d1
2023-02-16 23:08:28 +01:00
DannyS712
14ae304e35 Tests: add ObjectFactory to DummyServicesTrait
Mocks a ContainerInterface to support a specific list of services,
with has() and get() working correctly, and uses that for a real
ObjectFactory object.

Change-Id: Ie49b5a34e0f449cc4b9f6b31d6cc1bc943d04b43
2023-01-23 19:35:50 +00:00
daniel
166b569444 Make use of the new PageUpdateStatus
PageUpdateStatus provides clean access the the newly created
RevisionRecord.

Depends-On: Ia08c586198082ea47e8313d0d41835f9830fb29e
Change-Id: Id6963842321c4eaa3d7d029ad0b769f73433c103
2022-11-30 17:56:58 +00:00
Daimona Eaytoy
7a494d1fa4 tests: Upgrade PHPUnit from 8.5+ to 9.5+
* DeprecatedHooksTest: Don't use assertContains().
* Replace uses of deprecated asserts:
  - assertFileNotExists() -> assertFileDoesNotExist()
* Update hierarchy of MediaWikiPHPUnitResultPrinter, since ResultPrinter
  is an interface in PHPUnit 9.
* Remove temporary forward-compat methods.
* Remove directories that don't exist from tests/phpunit/suite.xml, since
  they now make PHPUnit exit:
   - tests/phpunit/skins, it used to have SideBarTest, then moved to
     tests/phpunit/includes/skins
   - tests/phpunit/documentation, it used to have ReleaseNotesTest, then
     moved to tests/phpunit/unit/documentation
* Update configuration with --migrate-configuration and reformat.
* Avoid redefining getMockBuilder() in
  ActionModuleBasedHandlerTestTrait, use a @method annotation instead.
* In RCCacheEntryFactoryTest, avoid using internal PHPUnit logic for
  HTML validation, and use native PHP methods instead. The code was
  copied from Xml::load (moved to \Xml\Loader::load in PHPUnit 9) and
  simplified for this use case.

Bug: T243600
Bug: T262076
Change-Id: I851b9158b73d0cfc315eed9d63b15c54b05895e3
2022-10-08 02:03:55 +02:00
Daimona Eaytoy
ee672592d8 tests: Replace assertRegExp with assertMatchesRegularExpression
And also assertNotRegExp -> assertDoesNotMatchRegularExpression. The
methods were renamed in PHPUnit 9.

Done automatically with:
  grep -rl assertRegExp tests/ | xargs sed -r -i "s/>assertRegExp\(/>assertMatchesRegularExpression\(/"
  grep -rl assertNotRegExp tests/ | xargs sed -r -i "s/>assertNotRegExp\(/>assertDoesNotMatchRegularExpression\(/"

Split out from Ifdba0f9e98eb6bce4590b7eb73170c51a697d7c6 so that it
remains smaller and easier to review.

Also make a test use MediaWikiUnitTestCase (it's already in the unit/
dir) so that it can access the forward-compat method.

Bug: T243600
Change-Id: Ifa279d5f201d7abeebece292141ebface8278046
2022-10-07 14:13:16 -04:00
jenkins-bot
c17df8ff78 Merge "tests/api: Add TestUser::getAuthority and use it" 2022-08-19 16:35:47 +00:00
Bartosz Dziewoński
f7158c396d Add markup to page titles to distinguish the namespace and the main text
Pages outside of the main namespace now have the following markup in
their <h1> page titles, using 'Talk:Hello' as an example:

<h1>
  <span class="mw-page-title-namespace">Talk</span>
  <span class="mw-page-title-separator">:</span>
  <span class="mw-page-title-main">Hello</span>
</h1>
(line breaks and spaces added for readability)

Pages in the main namespace only have the last part, e.g. for 'Hello':

<h1>
  <span class="mw-page-title-main">Hello</span>
</h1>

The change is motivated by a desire to style the titles differently on
talk pages in the DiscussionTools extension (T313636), but it could
also be used for other things:
* Language-specific tweaks (e.g. adding typographically-correct spaces
  around the colon separator: T249149, or replacing it with a
  different character: T36295)
* Site-specific tweaks (e.g. de-emphasize or emphasize specific
  namespaces like 'Draft': T62973 / T236215)

The markup is also added to automatically language-converted titles.

It is not added when the title is overridden using the wikitext
`{{DISPLAYTITLE:…}}` or `-{T|…}-` forms. I think this is a small
limitation, as those forms mostly used in the main namespace, where
the extra markup isn't very helpful anyway. This may be improved in
the future. As a workaround, users could also just add the same HTML
markup to their wikitext (as those forms accept it).

It is not also added when the title is overridden by an extension
like Translate. Maybe we'll have a better API before anyone wants
to do that. If not, one could un-mark Parser::formatPageTitle()
as @internal, and use that method to add the markup themselves.

Bug: T306440
Change-Id: I62b17ef22de3606d736e6c261e542a34b58b5a05
2022-08-16 23:36:21 +00:00
Umherirrender
ef0623ec06 tests/api: Add TestUser::getAuthority and use it
Change-Id: Icfb66f9927c8e67582010a208538b0b5e0ba353f
2022-08-06 23:15:27 +02:00
Derick Alangi
a3a2ed268a tests: Use overrideConfig(Value|Values) where needed
This patch covers: tests/phpunit/includes/actions/ and
tests/phpunit/includes/api/.

Change-Id: I60d8fb7b8a63b423606db935fa0d24cf859b2512
2022-07-12 22:24:50 +00:00
Umherirrender
68cef1ab99 Various whitespace changes
Change-Id: I31f316c66b3066461b9297c7b6f9845ade99f0df
2022-07-12 20:07:23 +02:00
Derk-Jan Hartman
fdbd6cff57 parse: Wrap indicators with a div.mw-parser-output element
Alternative to having this in the skin, is to do it for each separate
indicator. A counter argument against this was inline vs block mode
elements, specifically the reason why we stripped the p element. But
the p element has a margin in each and every skin. It's rather
unlikely that div's have such a standard layout. The wrapping div
around each indicator at the skin level is already inline-block, so
interactions between the indicators are already decoupled via that
skin element.

In this patch the wrapping is done in OutputPage when a ParserOutput
is added.  OutputPage::addHelpLink() also adds indicators, which would
not be wrapped by this patch; this is reasonable since the content of
::addHelpLink() is not parsed wikitext.  It's possible external users
may also call OutputPage::setIndicators() directly, which would also
add unwrapped indicators; the caller of OutputPage::setIndicators() is
responsible for wrapping any indicators which might come from parsed
wikitext.

Bug: T188443
Co-Authored-By: C. Scott Ananian <cananian@wikimedia.org>
Change-Id: I42be893101f7d7887480fe635143bea535ee5634
2022-06-17 21:17:31 +00:00
Func
845bf42aa9 ApiParse: Ignore 'contentformat' param when the query is based on page
The 'contentformat' param should only have effects when the parsing
is based on the 'text' param, as what the document described.

Bug: T206253
Change-Id: Ia12b8697e515c6ba89ea81f085292d1ef018bf58
2022-03-20 20:33:20 +08:00
Func
5339aa645b ApiParse: Fail gracefully when the requested format is not supported
Format like 'application/json' is not supported for content model
wikitext, don't fail as internal exception.

This fix the case when providing text/title parameter.

Bug: T206253
Change-Id: I20ef52aa961143b7c50283c0d06acea9f220619c
2022-03-19 19:29:28 +00:00
Alexander Vorwerk
9b09bf3112 Use updated ObjectFactory namespace
Depends-On: I99c5e5664d2401c36a9890f148eba7c25e6e8324
Depends-On: I48ab818b2965da14af15ef370aa83ad9455badd9
Depends-On: I018371e4b77911e56152ca7b2df734afc73f58a5
Change-Id: I04ebdb52102f6191d49a9cc70b1f98308299e72f
2022-03-09 23:04:51 +00:00
Timo Tijhof
128debb64b tests: Change use of AtEase to at operator
Follows-up I361fde0de7f4406bce6ed075ed397effa5be3359.

Per T253461, not mass-changing source code, but the use of the native
error silencing operator (@) is especially useful in tests because:

1. It requires any/all statements to be explicitly marked. The
   suppressWarnings/restoreWarnings sections encourage developers to
   be "lazy" and thus encapsulate more than needed if there are multiple
   ones near each other, which would ignore potentially important
   warnings in a test case, which is generally exactly the time when
   it is really useful to get warnings etc.

2. It avoids leaking state, for example in LBFactoryTest the
   assertFalse call would throw a PHPUnit assertion error (not meant
   to be caught by the local catch), and thus won't reach
   AtEase::restoreWarnings. This then causes later code to end up
   in a mismatching state and creates a confusing error_reporting
   state.

See .phpcs.xml, where the at operator is allowed for all test code.

Change-Id: I68d1725d685e0a7586468bc9de6dc29ceea31b8a
2022-02-24 21:29:51 +00:00
Reedy
12aae45101 tests: Replace some usages of Wikimedia\(suppress|restore)Warnings()
Change-Id: I361fde0de7f4406bce6ed075ed397effa5be3359
2022-02-24 12:55:25 +00:00
Reedy
6e29611642 Remove or replace usages of "sanity"
Still some more to go...

Bug: T254646
Change-Id: Ia117f01e443c35b4765f3275cab4f2707e1be96f
2021-11-21 16:42:31 +00:00
Ppchelko
643fc535c3 Reapply "Move limit report rendering to ParserOutput"
This reverts commit 2bcb3fe567.

Reason for revert: this is a good change,
just needed more work to not break CI

Change-Id: I23768bee242e3cf81b1493a740cf070e7ad1e224
2021-11-09 11:08:08 -08:00
Ppchelko
2bcb3fe567 Revert "Move limit report rendering to ParserOutput"
This reverts commit 89028e0b8e.

Reason for revert: Temporary until we deal with T295357

Change-Id: I556de18dbf900a9bc58d5ae22d1bf194682d0840
2021-11-09 15:57:18 +00:00
Petr Pchelko
89028e0b8e Move limit report rendering to ParserOutput
This does not move the actual limit report data into
ParserOptions yet, that should be done separately
given that it will require serialization changes.
Let's get this change settled first before messing
with serialization.

This unifies canonical and non-canonical ParserOptions,
so ParserCache can now be used with both. It is hard
to say how this will affect the ParserCache capacity,
so we should monitor it after releasing this.

Change-Id: I154c0a77a5b0287b5572614d56339fb57ac56c33
2021-11-08 12:45:41 -08:00
Fomafix
eed3121a8f Encode & to &amp; in displaytitle fallback
The value in the attribute displaytitle must contain valid HTML. The
sanitizer of the {{DISPLAYTITLE}} parser ensures that only valid HTML
is accepted.

If there is no {{DISPLAYTITLE}} in the wikitext then displaytitle
falls back to $title->getPrefixedText(). Here an HTML encoding of
special characters is necessary. This affects only the replacement of
& by &amp; because other special characters like < and > are not
allowed in the title.

This change affects the displaytitle fallback on the following places:
* ApiParse
* ApiQueryInfo
* InfoAction
* Parser

The displaytitle fallback in OutputPage is also updated to this
behavior although
Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $html )
also replaces & by &amp;.

Also add test cases with & in the displaytitle to:
* ApiParseTest
* ApiQueryInfoTest
* parserTests

Bug: T291985
Change-Id: I8ee1e2731d9bfa49725d663b34986e7e3073e4ca
2021-10-05 18:09:15 +00:00
James D. Forrester
df5eb22f83 Replace uses of DB_MASTER with DB_PRIMARY
Just an auto-replace from codesniffer for now.

Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
2021-04-29 09:24:31 -07:00
Daimona Eaytoy
535d7abf59 phpunit: Mass-replace setMethods with onlyMethods and adjust
Ended up using
  grep -Prl '\->setMethods\(' . | xargs sed -r -i 's/setMethods\(/onlyMethods\(/g'

special-casing setMethods( null ) -> onlyMethods( [] )

and then manual fix of failing test (from PS2 onwards).

Bug: T278010
Change-Id: I012dca7ae774bb430c1c44d50991ba0b633353f1
2021-04-16 20:15:00 +02:00
Umherirrender
a1de8b8700 Tests: Mark more more closures as static
Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208

Bug: T274036
Change-Id: I695873737167a75f0d94901fa40383a33984ca55
2021-02-09 02:55:57 +00:00
Thiemo Kreuz
ac205fa84c Fix incomplete/bogus PHPDoc tags in various tests
Most of these are found by the not yet released I10559d8.

I remove the type MockObject in some cases when the calling
code really does not need to know if he get's a mock or the
real thing. However, I do this only in places that are very
closely related to the fixes.

Change-Id: I26a4c3c5a8ae141bf56161b52b54bce7e68f2e30
2021-01-14 19:02:00 +00:00
daniel
00a3439dce Introduce RevisionOutputCache
Bug: T267981
Change-Id: Ib1dc641ed10d786918362b25bd655780d5844ba1
2020-12-14 16:50:28 +00:00
jdlrobson
d11cb401d6 Deprecate the use of Skin::setupSkinUserCss to alter the internal array of styles
Check the internal array of styles to determine whether
the method was inappropriately used to alter the array of styles and
if it was, call wfDeprecatedMsg().

Change-Id: I591b03c2e19d4b8cadfe220b498ae244d332f9fb
2020-11-24 10:49:09 +11:00
Tim Starling
e9608cc17d Revert "Deprecate Skin::setupSkinUserCss"
The commit did not really hard-deprecate overriding of setupSkinUserCss() as stated in the commit message, rather it removed core calls to setupSkinUserCss(), instantly breaking the many skins that still override it. It did not actually create a deprecation period for graceful migration.

As discussed in T267080, there is presently no way to hard-deprecate the override of a method.

This reverts commit 334cfeffd6.

Bug: T257990
Change-Id: I8f669ba30affc437800890c3a875994a9f2eb3c8
2020-11-24 10:03:11 +11:00
Umherirrender
448d2f4d51 Avoid local variable with wg prefix
Change-Id: Ib32cc0db07636238aa0b4f8ea7f8c1ae37084889
2020-10-28 22:21:24 +01:00
Ammar Abdulhamid
334cfeffd6 Deprecate Skin::setupSkinUserCss
Bug: T257990
Depends-On: I132513a897e40162acd973b9817b3103f4a33333
Depends-On: I363f8c9e39298ab9f74274d288681f2ef88a1894
Change-Id: I13bedd8c14de419ff1a88d5087f5669652cd3123
2020-08-09 02:09:08 +01:00
Ammar Abdulhamid
5dafaf9028 Remove usages of Skin::getAllowedSkins.
* Move the method to SkinFactory and replaces usages.
* Inject $wgSkipSkins into the SkinFactory

Bug: T257993
Change-Id: I9869cf34c5e87cbad963f48db0649b3b7a252a4a
2020-08-05 02:48:29 +01:00
DannyS712
2f4b71fc6c Replace uses of Revision constants
Bug: T257010
Change-Id: Id63123e8b8becd31756d5b68ca11edb238ec8a59
2020-07-03 01:23:44 +00:00
addshore
959bc315f2 MediaWikiTestCase to MediaWikiIntegrationTestCase
The name change happened some time ago, and I think its
about time to start using the name name!
(Done with a find and replace)

My personal motivation for doing this is that I have started
trying out vscode as an IDE for mediawiki development, and
right now it doesn't appear to handle php aliases very well
or at all.

Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
2020-06-30 17:02:22 +01:00
DannyS712
c595f2fd7e Remove use of the Revision object returned in WikiPage::doEditContent (2)
Each file's changes are independent and can be reviewed separately

Bug: T251853
Bug: T254952
Change-Id: Ifdc192796f0989c12fda7c0317bf2458874d6e19
2020-06-10 01:15:45 +00:00
Thiemo Kreuz
6aa6d10e86 Replace all call_user_func(_array) in all tests
There is native support for all of this now in PHP, thanks to changes
and additions that have been made in later versions. There should be no
need any more to ever use call_user_func() or call_user_func_array().

Reviewing this should be fairly easy: Because this patch touches
exclusivly tests, but no production code, there is no such thing as
"insufficent test coverage". As long as CI goes green, this should be
fine.

Change-Id: Ib9690103687734bb5a85d3dab0e5642a07087bbc
2020-06-06 18:41:20 +02:00
Reedy
229b2c15e8 Fix a plethora of class and function call case mismatches
Bug: T231412
Change-Id: I597a25de3294a6673424f30475760280ef209a8a
2020-05-26 14:14:46 +01:00
C. Scott Ananian
83a22b7fcd Remove codepaths which ran parser in 'untidy' mode
Disabling tidy has been deprecated since 1.33.  This cleans up the code
paths which still used untidy output.

Bug: T198214
Change-Id: I821ef3b8f59b272d983583d407b2f0794fe1e791
2020-04-13 21:34:04 +00:00