summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0424.json
blob: b94888810908d2e54094e7d9d505d44d1c5cfb4d (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
	"description": "Test in-text annotation for `_boo` datatype using `LOCL` (`wgContLang=en`, `wgLang=fr`, skip-on 1.25.6)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has boolean",
			"contents": "[[Has type::Boolean]]"
		},
		{
			"page": "Example/P0424/1",
			"contents": "[[Has boolean::true]] [[Category:P0424]]"
		},
		{
			"page": "Example/P0424/2",
			"contents": "{{#set:Has boolean=false}} [[Category:P0424]]"
		},
		{
			"page": "Example/P0424/Q1.1",
			"contents": "{{#ask: [[Category:P0424]] |?Has boolean |?Has boolean#LOCL}}"
		},
		{
			"page": "Example/P0424/Q1.2",
			"contents": "{{#ask: [[Category:P0424]] |?Has boolean |?Has boolean#LOCL@ja}}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0 true",
			"subject": "Example/P0424/1",
			"store": {
				"clear-cache": true
			},
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 4,
					"propertyKeys": [
						"Has_boolean",
						"_SKEY",
						"_MDAT",
						"_INST"
					],
					"propertyValues": [
						true
					]
				}
			}
		},
		{
			"type": "parser",
			"about": "#1 false",
			"subject": "Example/P0424/2",
			"store": {
				"clear-cache": true
			},
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 4,
					"propertyKeys": [
						"Has_boolean",
						"_SKEY",
						"_MDAT",
						"_INST"
					],
					"propertyValues": [
						false
					]
				}
			}
		},
		{
			"type": "parser",
			"about": "#3 LOCL used the user language",
			"subject": "Example/P0424/Q1.1",
			"assert-output": {
				"to-contain": [
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"1\">true</td>",
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"1\">vrai</td>",
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"0\">false</td>",
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"0\">faux</td>"
				]
			}
		},
		{
			"type": "parser",
			"about": "#4 LOCL@js uses a specific language",
			"subject": "Example/P0424/Q1.2",
			"assert-output": {
				"to-contain": [
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"1\">true</td>",
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"1\">真</td>",
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"0\">false</td>",
					"<td class=\"Has-boolean smwtype_boo\" data-sort-value=\"0\">偽</td>"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "fr",
		"smwgPageSpecialProperties": [
			"_MDAT"
		]
	},
	"meta": {
		"skip-on": {
			"mw-1.25.6": "Somehow the content lang is not set correctly on Travis (locally works fine)."
		},
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}