summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json61
1 files changed, 61 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json
new file mode 100644
index 00000000..38918bc2
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json
@@ -0,0 +1,61 @@
+{
+ "description": "Test in-text annotation with preferred property label/DISPLAYTITLE on user/predefined properties (`wgContLang=es`, `wgLang=de`, `wgRestrictDisplayTitle=false`)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Modification date",
+ "contents": "[[Has preferred property label::prefLabel-123@de]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has query",
+ "contents": "{{DISPLAYTITLE:query-displaytitle}}"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has keyword",
+ "contents": "[[Has preferred property label::prefLabel-456@de]]"
+ },
+ {
+ "page": "Example/P0438/1",
+ "contents": "[[Category:P0438]] [[Has keyword::some keyword]]"
+ },
+ {
+ "page": "Example/P0438/2",
+ "contents": "[[Category:P0438]] [[Has keyword::another keyword]]"
+ },
+ {
+ "page": "Example/P0438/Q.1",
+ "contents": "{{#ask: [[Category:P0438]] |?Modification date |?Modification date=ModificationSomeLabel |?Has keyword |?Has keyword=KeywordCaption |?Has query |?Has query=QueryCaption |limit=1 }}"
+ }
+ ],
+ "tests": [
+ {
+ "type": "parser",
+ "about": "#0 (combination of prefLabel, DISPLAYTITLE, local caption)",
+ "subject": "Example/P0438/Q.1",
+ "assert-output": {
+ "to-contain": [
+ "title=\"Property:Modification date\">prefLabel-123</a></span><span class=\"smwttcontent\">„prefLabel-123&#160;<span style=\"font-size:small;\">(Modification date)</span>“",
+ "title=\"Property:Modification date\">ModificationSomeLabel</a></span><span class=\"smwttcontent\">„prefLabel-123&#160;<span style=\"font-size:small;\">(Modification date)</span>“",
+ "&#160;<span title=\"Modification date\"><sup>ᵖ</sup></span>",
+ "title=\"Property:Has keyword\">prefLabel-456</a>&#160;<span title=\"Has keyword\"><sup>ᵖ</sup>",
+ "title=\"Property:Has keyword\">KeywordCaption</a>",
+ "title=\"Property:Has query\">query-displaytitle</a></span><span class=\"smwttcontent\">„query-displaytitle&#160;<span style=\"font-size:small;\">(Has query)</span>“",
+ "title=\"Property:Has query\">QueryCaption</a></span><span class=\"smwttcontent\">„query-displaytitle&#160;<span style=\"font-size:small;\">(Has query)</span>“",
+ ":Ask/-5B-5BCategoría:P0438-5D-5D/-3FModification-20date/-3FModification-20date=ModificationSomeLabel/-3FHas-20keyword/-3FHas-20keyword=KeywordCaption/-3FHas-20query/-3FHas-20query=QueryCaption/mainlabel=/limit=1/offset=1/format=table\">"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "es",
+ "wgLang": "de",
+ "wgRestrictDisplayTitle": false
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file