summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0404.json
blob: e11b31e7c15d8fa0ad9d9112c7b071ed54ee6643 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
	"description": "Test in-text annonation on different category colon identifier",
	"setup": [
		{
			"page": "Example/P0404/1",
			"contents": "[[Category:SingleColonNotion]], [[Category::DoubleColonNotion]]"
		},
		{
			"page": "Example/P0404/2",
			"contents": "[[Category:P4040]]"
		},
		{
			"page": "Example/P0404/Q.1",
			"contents": "{{#ask: [[Category:P4040]] |?Category }}"
		},
		{
			"page": "Example/P0404/Q.2",
			"contents": "{{#ask: [[Category:P4040]] |?Categories }}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0 : vs. ::",
			"subject": "Example/P0404/1",
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 4,
					"propertyKeys": [
						"Category",
						"_MDAT",
						"_SKEY",
						"_INST"
					],
					"propertyValues": [
						"SingleColonNotion",
						"DoubleColonNotion"
					]
				}
			}
		},
		{
			"type": "parser",
			"about": "#1 (printrequest singular use)",
			"subject": "Example/P0404/Q.1",
			"assert-output": {
				"to-contain": [
					"<th class=\"Category\"><a href=.*>Category</a></th>",
					"<td class=\"smwtype_wpg\"><a href=.*Example/P0404/2\" title=\"Example/P0404/2\">Example/P0404/2</a></td>"
				]
			}
		},
		{
			"type": "parser",
			"about": "#2 (printrequest plural use)",
			"subject": "Example/P0404/Q.2",
			"assert-output": {
				"to-contain": [
					"<th class=\"Category\"><a href=.*>Category</a></th>",
					"<td class=\"smwtype_wpg\"><a href=.*Example/P0404/2\" title=\"Example/P0404/2\">Example/P0404/2</a></td>"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgPageSpecialProperties": [
			"_MDAT"
		]
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}