mediawiki-extensions-Discus.../tests/phpunit
Bartosz Dziewoński 8e44b43df0 Split off ThreadItemSet from CommentParser
Goal:
-----
Finishing the work from Iadb7757debe000025e52770ca51ebcf24ca8ee66
by changing CommentParser::parse() to return a data object, instead of
the whole parser.

Changes:
--------
ThreadItemSet.php:
ThreadItemSet.js:
* New data class to access the results of parsing a discussion. Most
  methods and properties are moved from CommentParser with no changes.

CommentParser.php:
Parser.js:
* parse() returns a new ThreadItemSet.
* Remove methods moved to ThreadItemSet.
* Placeholder headings are generated slightly differently, as we process
  things in a different order.
* Grouping threads and computing IDs/names is no longer lazy. We always
  needed IDs/names anyway.
* computeId() explicitly uses a ThreadItemSet to check the existing IDs
  when de-duplicating.

controller.js:
* Move the code for turning some nodes annotated by CommentFormatter
  into a ThreadItemSet (previously a Parser) from controller#init to
  ThreadItemSet.static.newFromAnnotatedNodes, and rewrite it to handle
  assigning parents/replies and recalculating legacy IDs more nicely.
* mw.dt.pageThreads is now a ThreadItemSet.

Change-Id: I49bfe019aa460651447fd383f73eafa9d7180a92
2022-02-21 16:22:32 +00:00
..
unit Use DOMCompat::newDocument() to create a new Document 2021-07-30 18:15:11 -04:00
CommentFormatterTest.php Change CommentParser into a service 2022-02-19 19:51:57 +01:00
CommentModifierTest.php Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
CommentParserTest.php Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
EventDispatcherTest.php Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
IntegrationTestCase.php Set $wgUsePigLatinVariant = false while running tests 2021-12-01 23:25:30 +01:00
LanguageDataTest.php Change CommentParser into a service 2022-02-19 19:51:57 +01:00
MockCommentFormatter.php Change CommentParser into a service 2022-02-19 19:51:57 +01:00
MockEventDispatcher.php Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00
MockLanguageData.php Change CommentParser into a service 2022-02-19 19:51:57 +01:00
MockSubscriptionStore.php Automatic topic subscriptions (on any edit) 2021-11-15 22:45:42 +01:00
TestUtils.php Change CommentParser into a service 2022-02-19 19:51:57 +01:00
ThreadItemTest.php Split off ThreadItemSet from CommentParser 2022-02-21 16:22:32 +00:00