summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json
blob: 4dbcfde9b19ed37912fbc8d8e7e48ca1622d011c (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
	"description": "Test `Special:Browse` output for `_dat`, `_boo`, `_sobj`, `_uri` (`wgContLang=en`, `wgLang=es`, skip-on 1.25.6)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has date",
			"contents": "[[Has type::Date]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has boolean",
			"contents": "[[Has type::Boolean]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has number",
			"contents": "[[Has type::Number]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has atomic mass unit",
			"contents": "[[Has type::Quantity]] [[Corresponds to::1 u]] [[Corresponds to::1.660539040e-27 kg]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has url",
			"contents": "[[Has type::URL]]"
		},
		{
			"page": "Example/S0008/1",
			"contents": "[[Has date::12 Jan 1991 8:56]] [[Has boolean::true]] [[Category:S0008]]"
		},
		{
			"page": "Example/S0008/2",
			"contents": "[[Has number::0.00000000000012]] [[Has number::72.769482308]] [[Has number::1.334e-13]] [[Category:S0008]]"
		},
		{
			"page": "Example/S0008/3 (Hydrogen-1 atom)",
			"contents": "[[Has atomic mass unit::1.007825 u]] [[Category:S0008]]"
		},
		{
			"page": "Example/S0008/4",
			"contents": "{{#subobject:ABC::DEF|Has number=123}}"
		},
		{
			"page": "Example/S0008/5",
			"contents": "[[Has url::http://example.org/some1::23:334/::56]]"
		}
	],
	"tests": [
		{
			"type": "special",
			"about": "#0",
			"special-page": {
				"page": "Browse",
				"query-parameters": "Example/S0008/1",
				"request-parameters": {
					"output": "legacy"
				}
			},
			"assert-output": {
				"to-contain": [
					"<span class=\"smwb-value\">verdadero&#160;&#160;",
					"SearchByProperty/:Has-20boolean/true",
					"<span class=\"smwb-value\">08:56:00 12 ene 1991&#160;&#160;"
				]
			}
		},
		{
			"type": "special",
			"about": "#1 (numbers)",
			"special-page": {
				"page": "Browse",
				"query-parameters": "Example/S0008/2",
				"request-parameters": {
					"output": "legacy"
				}
			},
			"assert-output": {
				"to-contain": [
					"<span class=\"smwb-value\">1,2e-13&#160;&#160;",
					"<span class=\"smwb-value\">72,769&#160;&#160;",
					"<span class=\"smwb-value\">1,334e-13&#160;&#160;",
					"Special:SearchByProperty/:Has-20number/1.2e-2D13",
					"Special:SearchByProperty/:Has-20number/72.769482308",
					"Special:SearchByProperty/:Has-20number/1.334e-2D13"
				]
			}
		},
		{
			"type": "special",
			"about": "#2 (quantity)",
			"special-page": {
				"page": "Browse",
				"query-parameters": "Example/S0008/3 (Hydrogen-1 atom)",
				"request-parameters": {
					"output": "legacy"
				}
			},
			"assert-output": {
				"to-contain": [
					"<span class=\"smwb-value\">1,008&#160;u (1,673533e-27&#160;kg)&#160;&#160;",
					"Special:SearchByProperty/:Has-20atomic-20mass-20unit/1.007825-20u"
				]
			}
		},
		{
			"type": "special",
			"about": "#3 named subobject contains ::",
			"special-page": {
				"page": "Browse",
				"query-parameters": ":Example-2FS0008-2F4-23ABC::DEF",
				"request-parameters": {
					"output": "legacy"
				}
			},
			"assert-output": {
				"to-contain": [
					"<span class=\"smwb-value\">123&#160;&#160;",
					"Special:SearchByProperty/:Has-20number/123"
				]
			}
		},
		{
			"type": "special",
			"about": "#4 url contains :: (encoded with -3A)",
			"special-page": {
				"page": "Browse",
				"query-parameters": "Example/S0008/5",
				"request-parameters": {
					"output": "legacy"
				}
			},
			"assert-output": {
				"to-contain": [
					"href=\"http://example.org/some1::23:334/::56\">http://example.org/some1::23:334/::56</a>&#160;&#160;",
					"Special:SearchByProperty/:Has-20url/http-2D3A-2F-2Fexample.org-2Fsome1-2D3A-2D3A23-2D3A334-2F-2D3A-2D3A56"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "es",
		"smwgPageSpecialProperties": [
			"_MDAT"
		],
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"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
	}
}