remove( [ 'div', '.metadata' ] ); $text = $fmt->getText(); $this->assertSame( $expected, $text ); } public function provideExtracts() { // phpcs:ignore Generic.Files.LineLength $dutch = 'Dutch ( Nederlands (helpยทinfo)) is a West Germanic language and the native language of most of the population of the Netherlands'; $tocText = 'Lead
Section text
'; return [ [ 'Dutch ( Nederlands ) is a West Germanic language and the native language of ' . 'most of the population of the Netherlands', $dutch, true, ], 'HTML cleanup in HTML mode' => [ "\u{00A0}A & B", " A & B\r\n", false ], 'HTML cleanup in plain text mode' => [ 'A & B', " A & B\r\n", true ], [ "qux", 'qux', false, ], [ "qux", 'qux', false, ], [ "quux", 'quux', false, ], [ // Verify that TOC is properly removed (HTML mode) "Lead\nSection text
", $tocText, false, ], [ // Verify that TOC is properly removed (plain text mode) "Lead\n\n\x01\x021\2\1Section\nSection text", $tocText, true, ], ]; } }