diff options
author | C. Scott Ananian <cscott@cscott.net> | 2019-10-28 15:52:50 -0400 |
---|---|---|
committer | C. Scott Ananian <cscott@cscott.net> | 2019-10-29 14:00:29 -0400 |
commit | 045ec0a408ad42f3072bae38488999e08bf99101 (patch) | |
tree | 7a51df93a534d2ffecab52770f2804c60a566fa3 /tests/phpunit/includes/parser/MagicVariableTest.php | |
parent | f4d81f45b517d087ea65587ca5faef9703b18f35 (diff) | |
download | mediawikicore-045ec0a408ad42f3072bae38488999e08bf99101.tar.gz mediawikicore-045ec0a408ad42f3072bae38488999e08bf99101.zip |
Deprecate Parser implementation methods (will be private in next release)
The following public methods were renamed and made private; the old name
is hard-deprecated and calls the new renamed private method:
Parser::doMagicLinks() => handleMagicLinks()
Parser::doDoubleUnderscore() => handleMagicLinks()
Parser::doHeadings() => handleHeadings()
Parser::doAllQuotes() => handleAllQuotes()
Parser::replaceExternalLinks() => handleExternalLinks()
Parser::replaceInternalLinks() => handleInternalLinks()
Parser::replaceInternalLinks2() => handleInternalLinks2()
Parser::getVariableValue() => expandMagicVariable()
Parser::initialiseVariables() => initializeVariables()
Parser::formatHeadings() => finalizeHeadings()
Parser::test{Pst,Preprocess,Srvus}() => fuzzTest{Pst,Preprocess,Srvus}()
Additionally, the following methods are not used externally, but are
used outside the Parser class by core code. They have been marked
@internal:
Parser::doQuotes() (used by {{#displaytitle}}),
Parser::getExternalLink{Rel,Attribs}() (used by Linker),
Parser::normalizeLinkUrl() (used by Special:LinkSearch and elsewhere).
Parser::{brace,arg,extension}Substitution() (used by PPFrame)
Code search query:
https://codesearch.wmflabs.org/deployed/?q=do%28MagicLinks%7CDoubleUnderscore%7CHeadings%7CAllQuotes%29%7Creplace%28ExternalLinks%7CInternalLinks%28%7C2%29%29%7CgetVariableValue%7CinitialiseVariables%7CformatHeadings%7Ctest%28Pst%7CPreprocess%7CSrvus%29%7CdoQuotes%7CgetExternalLink%28Rel%7CAttribs%29%7CnormalizeLinkUrl%7C%28brace%2Carg%2Cextension%29Substitution&i=nope&files=&repos=
Bug: T236810
Change-Id: I19a43ffc5dcfdd2981b51079c33422c964acb076
Diffstat (limited to 'tests/phpunit/includes/parser/MagicVariableTest.php')
-rw-r--r-- | tests/phpunit/includes/parser/MagicVariableTest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/phpunit/includes/parser/MagicVariableTest.php b/tests/phpunit/includes/parser/MagicVariableTest.php index 02a4a2583ae8..cc474ddf1190 100644 --- a/tests/phpunit/includes/parser/MagicVariableTest.php +++ b/tests/phpunit/includes/parser/MagicVariableTest.php @@ -11,9 +11,11 @@ * @file */ +use Wikimedia\TestingAccessWrapper; + /** * @group Database - * @covers Parser::getVariableValue + * @covers Parser::expandMagicVariable */ class MagicVariableTest extends MediaWikiTestCase { /** @@ -222,7 +224,7 @@ class MagicVariableTest extends MediaWikiTestCase { $this->assertSame( $expected, - $this->testParser->getVariableValue( $magic ), + TestingAccessWrapper::newFromObject( $this->testParser )->expandMagicVariable( $magic ), $msg ); } |