summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0438.json
blob: 38918bc2447efedf6317ef4e66b4b167cd184833 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
	}
}