mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-13 17:57:11 +00:00
Add missing parser tests to cover parser hook and renderer
Without this the entire code in Hooks::render() is uncovered. Change-Id: Id347b278b6b5eed5f660c317ed21410de7910a1b
This commit is contained in:
parent
fe03b7710f
commit
da63a3fdc6
24
tests/parser/parserTests.txt
Normal file
24
tests/parser/parserTests.txt
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
!! options
|
||||||
|
version=2
|
||||||
|
!! end
|
||||||
|
|
||||||
|
!! hooks
|
||||||
|
templatedata
|
||||||
|
!! endhooks
|
||||||
|
|
||||||
|
!! test
|
||||||
|
Empty
|
||||||
|
!! wikitext
|
||||||
|
<templatedata />
|
||||||
|
!! html
|
||||||
|
<div class="mw-message-box-error mw-message-box"><p>Syntax error in JSON.
|
||||||
|
</p></div>
|
||||||
|
!! end
|
||||||
|
|
||||||
|
!! test
|
||||||
|
Minimal JSON
|
||||||
|
!! wikitext
|
||||||
|
<templatedata>{"params":{}}</templatedata>
|
||||||
|
!! html
|
||||||
|
<section class="mw-templatedata-doc-wrap"><header><p class="mw-templatedata-doc-desc mw-templatedata-doc-muted">No description.</p></header><table class="wikitable mw-templatedata-doc-params"><caption><p class="mw-templatedata-caption">Template parameters</p></caption><thead><tr><th colspan="2">Parameter</th><th>Description</th><th>Type</th><th>Status</th></tr></thead><tbody><tr><td class="mw-templatedata-doc-muted" colspan="7">No parameters specified</td></tr></tbody></table></section>
|
||||||
|
!! end
|
Loading…
Reference in a new issue