6 class EditPageTest
extends MediaWikiTestCase
{
9 * @dataProvider dataExtractSectionTitle
11 function testExtractSectionTitle( $section, $title ) {
12 $extracted = EditPage
::extractSectionTitle( $section );
13 $this->assertEquals( $title, $extracted );
16 function dataExtractSectionTitle() {
19 "== Test ==\n\nJust a test section.",
23 "An initial section, no header.",
27 "An initial section with a fake heder (bug 32617)\n\n== Test == ??\nwtf",
31 "== Section ==\nfollowed by a fake == Non-section == ??\nnoooo",
35 "== Section== \t\r\n followed by whitespace (bug 35051)",