aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/content/WikitextStructureTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Add namespace to WikitextContentEbrahim Byagowi2024-08-061-1/+3
| | | | | | | It adds MediaWiki\Content namespace to WikitextContent and two classes related. Change-Id: Ib74e4c5b3edac6aa0e35d3b2093ce1d0b794cb6d
* tests: Fix @covers and @coversDefaultClass to have leading \Reedy2024-02-161-1/+1
| | | | Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
* WikiTextStructure: Support heading tags with attributesBartosz DziewoƄski2024-02-081-1/+1
| | | | Change-Id: Ie68c7c695cb84ed6844d6d422284dca8c0c13072
* Avoid DB access in non-database testsDaimona Eaytoy2023-08-061-0/+1
| | | | | | | | Mock the needed dependencies to avoid database access when possible, and add the test to the Database group otherwise. Bug: T155147 Change-Id: Ic5c39ab35ab4d993721713285180f072497a5a40
* tests: Use Title::makeTitle instead of Title::newFromTextUmherirrender2023-06-191-1/+1
| | | | | | Avoid parsing known titles in tests to improve performance Change-Id: Iddefe62c3d85281642f17e60cbc27aff47b85a67
* Reorg: Namespace the Title classJames D. Forrester2023-03-021-0/+2
| | | | | | | | | | | | | | | | | | | 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
* Replace Content::getParserOutput call to ContentRenderer::getParserOutputRoman Stolar2021-10-201-1/+2
| | | | | Bug: T287158 Change-Id: I8a13f45027e08e2d8ddefa140dd47a0c55094934
* WikitextStructureTest: combine single use methodsDannyS7122021-02-271-15/+3
| | | | Change-Id: Ibdcd4d800a00c2b6c3fc3b9f64bff8e3ba47de32
* Preserve whitespace in search index text contentErik Bernhardson2018-09-141-1/+7
| | | | | | | | | Certain html tags imply a word break, but our html stripping doesn't understand that at all. Adjust the html stripping to inject whitespace for all block level tags (per MDN) along with the <br> element. Bug: T195389 Change-Id: I9fbfac765ea88628e4f9b2794fb54e1cd0060203
* RFC T157418: Trim whitespace in table cells, list items, headingsSubramanya Sastry2018-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | * Matmarex had implemented this for wikitext headings in b3dd3881. * This patch extends this to wikitext list items and wikitext table cells. * Updated RELEASE NOTES. tests/parser/parserTests.txt: * All whitespace removed in output of list items, table cells, and headings. Removed corresponding whitespace in the input wikitext except for a few tests where the whitespace is significant "| +" or "| -", for example. * Updated output of html/parsoid sections as well. * Added new tests to spec white-space trimming behavior. tests/phpunit/*: * Fixed a few tests that used whitespace in list items and table cells. Bug: T157418 Change-Id: I8ea34c7ab893c0c125c81d810feeb3c581e4bba1
* Add @covers tags to ContentHandler testsKunal Mehta2017-12-271-0/+3
| | | | Change-Id: I4d0994e91f63a0921343f34ef81a82463b4ab969
* Add missing type to @param documentationUmherirrender2017-08-111-2/+2
| | | | Change-Id: I6b2c9c7af9a281fe457099cc3a336a60a25e74aa
* Merge "Add DEFAULTSORT to search index field data"jenkins-bot2016-09-011-0/+13
|\
| * Add DEFAULTSORT to search index field datadcausse2016-08-291-0/+13
| | | | | | | | | | | | | | | | | | | | | | Added FLAG_SOURCE_DATA to support additional data that is not supposed to be part of the default mapping. Should merged with I1484c2e62788bedb57a42869a5fb25cd8f64482f, otherwize rebuilding an index may add an extra field to CirrusSearch mapping. Bug: T134978 Change-Id: Ia41f8eeb9dd4f764543bdd4d71b7a50de8101101
* | Extract ParserOutput search index data fields from WikiTextContentHandleraude2016-08-191-55/+0
|/ | | | | Bug: T142491 Change-Id: I69b010b893135e53fac7f16f4b927b8fbcba06d2
* Add search-ignored-headings string, copied from cirrus-search-ignored-headings.Stanislav Malyshev2016-08-041-1/+2
| | | | Change-Id: I4178f872996800379843301f7119840f4a4551df
* Make content handlers assemble content for searchStanislav Malyshev2016-07-261-0/+148
Bug: T89733 Change-Id: Ie45de496ecc826211d98eea3a410c7639b4be0a4