diff options
author | Bartosz Dziewoński <matma.rex@gmail.com> | 2023-10-24 03:33:44 +0200 |
---|---|---|
committer | Bartosz Dziewoński <dziewonski@fastmail.fm> | 2023-10-24 19:02:23 +0200 |
commit | 154e9a444c63fa698b9de323f6b8d79c73dd20c8 (patch) | |
tree | 9118cd9724fe8095253102ccc816cfc8606928fd /tests/phpunit/includes/parser/ParserOutputTest.php | |
parent | e828301de4f7eb70ce29fea9db0353ae789547c7 (diff) | |
download | mediawikicore-154e9a444c63fa698b9de323f6b8d79c73dd20c8.tar.gz mediawikicore-154e9a444c63fa698b9de323f6b8d79c73dd20c8.zip |
tests: Use fallback skin for ParserOutput/DefaultOutputTransform tests
This matches the behavior of parserTests.txt again (in which
the fallback skin is used by ParserTestRunner::runLegacyTest).
The extra <span> wrappers were added by the Vector skin
(and could be affected by future changes to the Vector skin).
Follow-up to Ief6a6ee03ada8207fc5c60ea438412fa2d529022.
Change-Id: I33729b5026fcfbdbacc0e3fdfef91c9e6b461e6c
Diffstat (limited to 'tests/phpunit/includes/parser/ParserOutputTest.php')
-rw-r--r-- | tests/phpunit/includes/parser/ParserOutputTest.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/phpunit/includes/parser/ParserOutputTest.php b/tests/phpunit/includes/parser/ParserOutputTest.php index 0c7ae1a4b37b..88aa712e42ab 100644 --- a/tests/phpunit/includes/parser/ParserOutputTest.php +++ b/tests/phpunit/includes/parser/ParserOutputTest.php @@ -279,6 +279,10 @@ class ParserOutputTest extends MediaWikiLangTestCase { * @param string $expect Expected output */ public function testGetText( $options, $text, $expect ) { + // Avoid other skins affecting the section edit links + $this->overrideConfigValue( MainConfigNames::DefaultSkin, 'fallback' ); + RequestContext::resetMain(); + $this->overrideConfigValues( [ MainConfigNames::ArticlePath => '/wiki/$1', MainConfigNames::ScriptPath => '/w', @@ -377,16 +381,16 @@ EOF; </ul> </div> -<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=1" title="Edit section: Section 1"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></h2> +<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p>One </p> -<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=2" title="Edit section: Section 2"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></h2> +<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p>Two </p> <h3><span class="mw-headline" id="Section_2.1">Section 2.1</span></h3> <p>Two point one </p> -<h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=4" title="Edit section: Section 3"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></h2> +<h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=4" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p>Three </p> EOF @@ -426,16 +430,16 @@ EOF <div class="mw-parser-output"><p>Test document. </p> -<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=1" title="Edit section: Section 1"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></h2> +<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p>One </p> -<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=2" title="Edit section: Section 2"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></h2> +<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p>Two </p> <h3><span class="mw-headline" id="Section_2.1">Section 2.1</span></h3> <p>Two point one </p> -<h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=4" title="Edit section: Section 3"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></h2> +<h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Test_Page&action=edit&section=4" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2> <p>Three </p></div> EOF |