summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0210.json
blob: b026679867b9451827653a6776fe37d410c94482 (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
{
	"description": "Test `format=table` on `_qty` for unit labels with spaces (#1718, `wgContLang=en`, `SMW_DV_NUMV_USPACE`)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has area with spaces",
			"contents": "[[Has type::Quantity]], [[Corresponds to::1 km², km ²]] [[Corresponds to::0.38610 sq mi, sqmi]] [[Corresponds to::1000 m², m ²]]"
		},
		{
			"page": "Example/F0210/1",
			"contents": "[[Has area with spaces::10 km ²]] [[Has area with spaces::3 sqmi]] [[Has area with spaces::50 m ²]] [[Category:F0210]]"
		},
		{
			"page": "Example/F0210/Q1.1",
			"contents": "{{#ask: [[Category:F0210]][[Has area with spaces::+]] |?Has area with spaces |format=table |headers=plain }}"
		},
		{
			"page": "Example/F0210/Q1.2",
			"contents": "{{#ask: [[Has area with spaces::10 km ²]] |format=table |headers=plain |link=none }}"
		},
		{
			"page": "Example/F0210/Q1.3",
			"contents": "{{#ask: [[Has area with spaces::10 km²]] |format=table |headers=plain |link=none }}"
		}
	],
	"tests": [
		{
			"type": "format",
			"about": "#0",
			"subject": "Example/F0210/Q1.1",
			"assert-output": {
				"to-contain": [
					"<span class=\"smwtext\">10&#160;km²</span><span class=\"smwttcontent\">3.861&#160;sq mi <br />10,000&#160;m² <br /></span></span>",
					"<span class=\"smwtext\">7.77&#160;km²</span><span class=\"smwttcontent\">3&#160;sq mi <br />7,770.008&#160;m² <br /></span></span>",
					"<span class=\"smwtext\">0.05&#160;km²</span><span class=\"smwttcontent\">0.0193&#160;sq mi <br />50&#160;m² <br /></span></span>"
				]
			}
		},
		{
			"type": "format",
			"about": "#1",
			"subject": "Example/F0210/Q1.2",
			"assert-output": {
				"to-contain": [
					"<td class=\"smwtype_wpg\">Example/F0210/1</td>"
				]
			}
		},
		{
			"type": "format",
			"about": "#2",
			"subject": "Example/F0210/Q1.3",
			"assert-output": {
				"to-contain": [
					"<td class=\"smwtype_wpg\">Example/F0210/1</td>"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgDVFeatures": [
			"SMW_DV_NUMV_USPACE"
		],
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}