summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0032.json
blob: dd2f11adf2af2889c5e64b006dc93d085647c1d6 (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
{
	"description": "Test `format=json` output via `Special:Ask` for `_ref_rec`/`_qty` type (#3517)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Ref prop",
			"contents": "[[Has type::Reference]] [[Has fields::Field prop;other prop]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Field prop",
			"contents": "[[Has type::Quantity]] [[Corresponds to::1 km]]"
		},
		{
			"namespace": "NS_MAIN",
			"page": "S0032/1",
			"contents": "[[Ref prop::123;S0032/2]] [[Category:S0032]]"
		}
	],
	"tests": [
		{
			"type": "special",
			"about": "#0",
			"special-page": {
				"page": "Ask",
				"request-parameters": {
					"p": {
						"link": "none",
						"limit": "10",
						"offset": "0",
						"mainlabel": "",
						"prettyprint": false,
						"unescape": true,
						"format": "json"
					},
					"q": "[[Category:S0032]]",
					"po": "?Ref prop.Field prop"
				}
			},
			"assert-output": {
				"to-contain": [
					"\"chain\":\"Ref prop.Field prop\"",
					"{\"Field prop\":[{\"value\":123,\"unit\":\"km\"}]}"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"wgLanguageCode": "en",
		"smwgPageSpecialProperties": [
			"_MDAT"
		],
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}