3 class EditPageTest
extends MediaWikiTestCase
{
6 * @dataProvider dataExtractSectionTitle
8 function testExtractSectionTitle( $section, $title ) {
9 $extracted = EditPage
::extractSectionTitle( $section );
10 $this->assertEquals( $title, $extracted );
13 function dataExtractSectionTitle() {
16 "== Test ==\n\nJust a test section.",
20 "An initial section, no header.",
24 "An initial section with a fake heder (bug 32617)\n\n== Test == ??\nwtf",
28 "== Section ==\nfollowed by a fake == Non-section == ??\nnoooo",