Add tests for events on multiple sections edits

Mainly as preparation for future patches touching that issue.

Change-Id: I80fd885cbf670e0e3252e38b85703c9d052b3056
This commit is contained in:
WMDE-Fisch 2016-08-02 17:14:48 +02:00
parent 9e206ef8f5
commit 547abe3bdb
5 changed files with 109 additions and 0 deletions

View file

@ -387,6 +387,45 @@ class EchoDiscussionParserTest extends MediaWikiTestCase {
),
),
),
array(
'new' => 747798766,
'old' => 747798765,
'username' => 'Admin',
'lang' => 'en',
'pages' => array(),
'title' => 'UTPage',
'expected' => array(
array(
'type' => 'mention-failure',
'agent' => 'Admin',
'section-title' => 'Section 2',
),
),
),
array(
'new' => 747798767,
'old' => 747798765,
'username' => 'Admin',
'lang' => 'en',
'pages' => array(),
'title' => 'UTPage',
'expected' => array(
array(
'type' => 'mention-failure',
'agent' => 'Admin',
'section-title' => 'Section 2',
),
),
),
array(
'new' => 747798768,
'old' => 747798765,
'username' => 'Admin',
'lang' => 'en',
'pages' => array(),
'title' => 'UTPage',
'expected' => array(),
),
);
}

View file

@ -0,0 +1,9 @@
Simultaneously edit multiple sections
== Section 1 ==
Content 1
== Section 2 ==
Content 2

View file

@ -0,0 +1,19 @@
Simultaneously edit multiple sections
== Section 1 ==
Content 1
New content with userlink ( dont try to mention this one )
[[User:Test11]]
== Section 2 ==
Content 2
New content with userlink & signature in another section ( try to mention this one )
[[User:NoUser]]
[[:User:Admin|Admin]] 13:22, 23 June 2016 (UTC)

View file

@ -0,0 +1,25 @@
Simultaneously edit multiple sections
== Section 1 ==
Content 1
New content with userlink ( dont try to mention this one )
[[User:Test11]]
== Section 1.5 ==
New section in between with userlink ( dont try to mention this one )
[[User:Test11]]
== Section 2 ==
Content 2
New content with userlink & signature in another section ( try to mention this one )
[[User:NoUser]]
[[:User:Admin|Admin]] 13:22, 23 June 2016 (UTC)

View file

@ -0,0 +1,17 @@
Simultaneously edit multiple sections
== Section 1 ==
Content 1
New content with signature
[[:User:Admin|Admin]] 13:22, 23 June 2016 (UTC)
== Section 2 ==
Content 2
New content with userlink ( dont try to mention this one )
[[User:Test11]]