mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 08:23:52 +00:00
Merge "Ignore warnings about legacy IDs in tests"
This commit is contained in:
commit
37979df1a1
|
@ -1149,7 +1149,7 @@ class CommentParser {
|
|||
|
||||
if ( isset( $this->threadItemsById[$id] ) ) {
|
||||
// Well, that's tough
|
||||
$threadItem->addWarning( 'Duplicate comment ID' );
|
||||
$threadItem->addWarning( 'Duplicate comment legacy ID' );
|
||||
// Finally, disambiguate by adding sequential numbers, to allow replying to both comments
|
||||
$number = 1;
|
||||
while ( isset( $this->threadItemsById["$id|$number"] ) ) {
|
||||
|
|
|
@ -89,6 +89,8 @@ class CommentParserTest extends IntegrationTestCase {
|
|||
$serialized->id = $threadItem->getId();
|
||||
|
||||
$serialized->warnings = $threadItem->getWarnings();
|
||||
// Ignore warnings about legacy IDs (we don't have them in JS)
|
||||
$serialized->warnings = array_values( array_diff( $serialized->warnings, [ 'Duplicate comment legacy ID' ] ) );
|
||||
|
||||
$serialized->replies = [];
|
||||
foreach ( $threadItem->getReplies() as $reply ) {
|
||||
|
|
Loading…
Reference in a new issue