setEditSection( true ); $parser = new Parser(); $text = $parser->parse( $wikiText, $title, $po )->getText(); $fmt = new ExtractFormatter( $text, $plainText ); $fmt->remove( '.metadata' ); // Will be added via $wgExtractsRemoveClasses on WMF $text = trim( $fmt->getText() ); $this->assertEquals( $expected, $text ); } public function provideExtracts() { $dutch = "'''Dutch''' (" . "[[File:Loudspeaker.svg|11px|link=File:nl-Nederlands.ogg|About this sound]] [[:Media:nl-Nederlands.ogg|''Nederlands'']]" . " ([[Wikipedia:Media help|" . "help]]ยท[[:File:nl-Nederlands.ogg|info]])) is a" . " [[West Germanic languages|West Germanic language]] and the native language of most of the population of the [[Netherlands]]"; return array( array( "Dutch ( Nederlands ) is a West Germanic language and the native language of most of the population of the Netherlands", $dutch, true, ), ); } }