summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0031.json
blob: 829a37c8b03d5d4e0d2c73315ed81d01a68ca872 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
	"description": "Test `Special:Ask` output on `?...=[[...|...]]|+index...`",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has page",
			"contents": "[[Has type::Page]]"
		},
		{
			"page": "Example/S0031/1",
			"contents": "[[Has page::123]] [[Category:S0031]]"
		}
	],
	"tests": [
		{
			"type": "special",
			"about": "#0 (#3211, label `?Has page=[[Foo|bar]]` ",
			"special-page": {
				"page": "Ask",
				"query-parameters": "-5B-5BHas-20page::123-5D-5D-20-5B-5BCategory:S0031-5D-5D/-3FHas-20page%3D-5B-5BFoo-7Cbar-5D-5D/mainlabel%3D/offset%3D0/format%3Dtable/headers%3Dplain",
				"request-parameters": []
			},
			"assert-output": {
				"to-contain": [
					"{{#ask: [[Has page::123]] [[Category:S0031]]",
					" |?Has page=[[Foo|bar]]",
					" |order=asc",
					" |headers=plain",
					" |mainlabel="
				]
			}
		},
		{
			"type": "special",
			"about": "#1 (#3211, label `?Has page=[[Foo|bar]]|+index=1` ",
			"special-page": {
				"page": "Ask",
				"query-parameters": "-5B-5BHas-20page::123-5D-5D-20-5B-5BCategory:S0031-5D-5D/-3FHas-20page%3D-5B-5BFoo-7Cbar-5D-5D-7C%2Bindex%3D1/mainlabel%3D/offset%3D0/format%3Dtable/headers%3Dplain",
				"request-parameters": []
			},
			"assert-output": {
				"to-contain": [
					"{{#ask: [[Has page::123]] [[Category:S0031]]",
					" |?Has page=[[Foo|bar]]|+index=1",
					" |order=asc",
					" |headers=plain",
					" |mainlabel="
				]
			}
		},
		{
			"type": "special",
			"about": "#2 (#3211, label `?Has page=[[Foo|bar]]|+index=1` ",
			"special-page": {
				"page": "Ask",
				"query-parameters": [],
				"request-parameters": {
					"p": {
						"headers": "plain",
						"limit": "10",
						"offset": "0",
						"mainlabel": "",
						"searchlabel": ""
					},
					"q": "[[Has page::123]] [[Category:S0031]]",
					"po": "?Has page=[[Foo|bar]]|+index=1"
				}
			},
			"assert-output": {
				"to-contain": [
					"{{#ask: [[Has page::123]] [[Category:S0031]]",
					" |?Has page=[[Foo|bar]]|+index=1",
					" |order=asc",
					" |headers=plain"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLanguageCode": "en",
		"smwgPageSpecialProperties": [
			"_MDAT"
		],
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}