wiki.techinc.nl/tests/parser
C. Scott Ananian a6739e066e Use Remex/HtmlHelper to implement Parser::replaceTableOfContents
This is more robust and secure than the regular expression previously
used to extract the <meta> tag.

We also improve HtmlHelper slightly be adding the ability to replace
an element with an 'outerHTML' string.

Because our output is being run through Remex, there is a slightly
larger degree of HTML normalization in the output than previously,
which is visible in some small tweaks to test case outputs.

Bug: T381617
Depends-On: I2712e0fa9272106e8cd686980f847ee7f6385b6f
Change-Id: I4cb2f29cf890af90f295624c586d9e1eb1939b95
(cherry picked from commit 7ebd8034b54495f28f4c5583d4fa55071634b593)
2025-09-29 22:01:08 +00:00
..
AnsiTermColorer.php
badCharacters.txt SECURITY: Ensure emitted HTML is safe against Unicode NFC normalization 2025-04-10 15:56:06 +01:00
comments.txt
DbTestPreviewer.php Use expression builder to avoid IDatabase::addQuotes 2024-07-18 18:44:34 +00:00
DbTestRecorder.php Pass function name to IDatabase functions 2024-09-19 21:02:52 +02:00
definitionLists.txt
DjVuSupport.php
DummyTermColorer.php
editTests.php Add namespace to maintenance/includes classes 2024-10-09 11:02:09 -04:00
extLinks.txt Update RfC links to bypass redirect 2025-06-03 16:37:04 -04:00
fuzzTest.php tests: Use namespaced ParserOptions 2024-10-16 01:35:06 +01:00
headings.txt Use Remex/HtmlHelper to implement Parser::replaceTableOfContents 2025-09-29 22:01:08 +00:00
indentPre.txt
indicators.txt Sync up core repo with Parsoid 2024-09-12 18:58:43 +03:00
interlanguageLinks.txt Sync up core repo with Parsoid 2024-09-24 12:36:03 -04:00
interwikiLinks.txt Sync up core repo with Parsoid 2025-06-03 17:36:27 -04:00
langParserTests.txt Sync up core repo with Parsoid 2025-06-03 17:36:27 -04:00
legacyHeadings.txt Use Remex/HtmlHelper to implement Parser::replaceTableOfContents 2025-09-29 22:01:08 +00:00
legacyMedia.txt Update RfC links to bypass redirect 2025-06-03 16:37:04 -04:00
magicLinks.txt Update RfC links to bypass redirect 2025-06-03 16:37:04 -04:00
magicWords.txt parser: Add a new {{USERLANGUAGE}} magic word for use in wikitext 2024-09-07 19:16:32 +00:00
media.txt Sync up core repo with Parsoid 2025-06-03 17:36:27 -04:00
MultiTestRecorder.php
ParserTestMockParser.php tests: Use namespaced ParserOptions 2024-10-16 01:35:06 +01:00
ParserTestParserHook.php
ParserTestPrinter.php
ParserTestResult.php
ParserTestResultNormalizer.php
ParserTestRunner.php PaserTestRunner: Avoid json_decode deprecation warning 2024-12-26 23:49:11 +00:00
parserTests.php Add namespace to maintenance/includes classes 2024-10-09 11:02:09 -04:00
parserTests.txt Use Remex/HtmlHelper to implement Parser::replaceTableOfContents 2025-09-29 22:01:08 +00:00
pfeqParserTests.txt
PhpunitTestRecorder.php
preprocessor.txt
preTags.txt
pst.txt
pWrapping.txt
quotes.txt
README
redirects.txt
tables.txt Sync up core repo with Parsoid 2024-09-12 18:58:43 +03:00
TestFileEditor.php
TestRecorder.php
wtEscaping.txt Update RfC links to bypass redirect 2025-06-03 16:37:04 -04:00

Parser tests can be run either via PHPUnit or by using the standalone
parserTests.php in this directory. The standalone version provides more
options.

To run parser tests via PHPUnit:

 $ composer phpunit -- --testsuite parsertests

You can optionally filter by title using --filter, e.g.

 composer phpunit -- --testsuite parsertests --filter="T6400"