Kartographer
Extension that adds maps to wiki pages
|
@group Kartographer @group Database @covers \Kartographer\Tag\ErrorReporter @covers \Kartographer\Tag\LegacyTagHandler @covers \Kartographer\Tag\LegacyMapFrame @covers \Kartographer\Tag\LegacyMapLink @license MIT More...
Public Member Functions | |
testTagData ( $expected, string $input, string $message, bool $wikivoyageMode=false) | |
@dataProvider provideTagData | |
testTagDataParsoid ( $expected, string $input, string $message, bool $wikivoyageMode=false, ?string $parsoid=null) | |
@dataProvider provideTagData | |
testBothTrackingCategories () | |
testBothTrackingCategoriesParsoid () | |
testSrcOffsetsDoNotCrash () | |
There are three ways of handling srcOffsets in the extension: a/ do nothing b/ pass srcOffsets for the embedded wikitext c/ reset the frame. | |
testNoTrackingCategories () | |
testNoTrackingCategoriesParsoid () | |
testResourceModules (string $input, array $expectedModules, array $expectedStyles) | |
@dataProvider provideResourceModulesData | |
testResourceModulesParsoid (string $input, array $expectedModules, array $expectedStyles) | |
@dataProvider provideResourceModulesData | |
testImagePreview () | |
testLiveData (string $wikitext, array $expected, bool $isPreview=false, bool $isSectionPreview=false, bool $wikivoyageMode=false) | |
@dataProvider provideLiveData | |
testLiveDataParsoid (string $wikitext, array $expected, bool $isPreview=false, bool $isSectionPreview=false, bool $wikivoyageMode=false) | |
@dataProvider provideLiveData | |
testPageProps (string $text, ?int $frames, ?int $links) | |
@dataProvider providePageProps | |
testGroupNames (array $expected, string $input) | |
@dataProvider provideGroupNames | |
testInvalidGroupNames (string $input) | |
@dataProvider provideInvalidGroupNames | |
Static Public Member Functions | |
static | provideTagData () |
static | provideResourceModulesData () |
static | provideLiveData () |
static | providePageProps () |
static | provideGroupNames () |
static | provideInvalidGroupNames () |
Protected Member Functions | |
setUp () | |
@group Kartographer @group Database @covers \Kartographer\Tag\ErrorReporter @covers \Kartographer\Tag\LegacyTagHandler @covers \Kartographer\Tag\LegacyMapFrame @covers \Kartographer\Tag\LegacyMapLink @license MIT
|
static |
@noinspection HtmlUnknownTarget
Kartographer\Tests\KartographerTest::testSrcOffsetsDoNotCrash | ( | ) |
There are three ways of handling srcOffsets in the extension: a/ do nothing b/ pass srcOffsets for the embedded wikitext c/ reset the frame.
Doing nothing fails parserTests introduced when fixing T362034). Passing srcOffsets is very error-prone since the wikitext content can be normalized (stripped spaces, converted entities) and simply passing them blindly can crash the rendering on UTF-8 boundary issues (see T373460). This test ensures that if the srcOffsets are reintroduced at some point, they avoid the pitfalls we already ran into.