summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0908.json
blob: 3632002f5025f2eb98af8ce23791a2761d9c0b62 (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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
	"description": "Test `_wpg`/`_txt`/`_uri` on enabled `SMW_FIELDT_CHAR_LONG | SMW_FIELDT_CHAR_NOCASE` with `like:/nlike:` (#1912, #2499, `smwgFieldTypeFeatures`, `smwgSparqlQFeatures`)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has page",
			"contents": "[[Has type::page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has text",
			"contents": "[[Has type::Text]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has url",
			"contents": "[[Has type::URL]]"
		},
		{
			"page": "Example/Q0908/0",
			"contents": "[[Category:Q0908]] [[Has page::Some title]] [[Has text::Some title]] [[Has url::http://example.org/some title]] {{#subobject: |Has page=SOME title |Has text=SOME title |Has url=http://example.org/SOME title |@category=Q0908 }}"
		},
		{
			"page": "Example/Q0908/1",
			"contents": "[[Category:Q0908]] [[Has page::Some title WiTH a VaLUE]] {{#subobject: |Has page=SOME title WITH A value |@category=Q0908 }}"
		},
		{
			"page": "Example/Q0908/2",
			"contents": "[[Category:Q0908]] [[Has text::Some title WiTH a VaLUE]] {{#subobject: |Has text=SOME title WITH A value |@category=Q0908 }}"
		},
		{
			"page": "Example/Q0908/3",
			"contents": "[[Category:Q0908]] [[Has url::http://example.org/Some title WiTH a VaLUE]] {{#subobject: |Has url=http://example.org/SOME title WITH A value |@category=Q0908 }}"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0 (on _wpg, like:)",
			"condition": "[[Category:Q0908]] [[Has page::like:some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/1#0##",
					"Example/Q0908/1#0##_fddfd44d1be8e8a7f3ea5f4893df9963"
				]
			}
		},
		{
			"type": "query",
			"about": "#1 (on _wpg, nlike:)",
			"condition": "[[Category:Q0908]] [[Has page::nlike:some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/0#0##",
					"Example/Q0908/0#0##_34013e9e1a62a2138034ac5287a7cf0e"
				]
			}
		},
		{
			"type": "query",
			"about": "#2 (on _txt, equal)",
			"condition": "[[Category:Q0908]] [[Has text::some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/2#0##",
					"Example/Q0908/2#0##_52d6bd41c1e8946f754f9687b88ded4c"
				]
			}
		},
		{
			"type": "query",
			"about": "#3 (on _txt, like:)",
			"condition": "[[Category:Q0908]] [[Has text::like:some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/2#0##",
					"Example/Q0908/2#0##_52d6bd41c1e8946f754f9687b88ded4c"
				]
			}
		},
		{
			"type": "query",
			"about": "#4 (on _txt, nlike:)",
			"condition": "[[Category:Q0908]] [[Has text::nlike:some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/0#0##",
					"Example/Q0908/0#0##_34013e9e1a62a2138034ac5287a7cf0e"
				]
			}
		},
		{
			"type": "query",
			"about": "#5 (on _uri, equal)",
			"skip-on": {
				"fuseki": "Using lcase on _uri/equal is not supported",
				"sesame": "Using lcase on _uri/equal is not supported",
				"blazegraph": "Using lcase on _uri/equal is not supported",
				"virtuoso": "Using lcase on _uri/equal is not supported"
			},
			"condition": "[[Category:Q0908]] [[Has url::http://example.org/some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/3#0##",
					"Example/Q0908/3#0##_bc98426861e347260e7aa56265803598"
				]
			}
		},
		{
			"type": "query",
			"about": "#6 (on _uri, like:)",
			"condition": "[[Category:Q0908]] [[Has url::like:http://example.org/some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/3#0##",
					"Example/Q0908/3#0##_bc98426861e347260e7aa56265803598"
				]
			}
		},
		{
			"type": "query",
			"about": "#7 (on _uri, nlike:)",
			"condition": "[[Category:Q0908]] [[Has url::nlike:http://example.org/some title with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/0#0##",
					"Example/Q0908/0#0##_34013e9e1a62a2138034ac5287a7cf0e"
				]
			}
		},
		{
			"type": "query",
			"about": "#8 (on _uri, in:)",
			"condition": "[[Category:Q0908]] [[Has url::in:with a value]]",
			"printouts": [],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Example/Q0908/3#0#",
					"Example/Q0908/3#0##_bc98426861e347260e7aa56265803598"
				]
			}
		}
	],
	"settings": {
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		},
		"smwgSparqlQFeatures": [
			"SMW_SPARQL_QF_NOCASE"
		],
		"smwgFieldTypeFeatures": [
			"SMW_FIELDT_CHAR_NOCASE",
			"SMW_FIELDT_CHAR_LONG"
		],
		"smwgElasticsearchConfig" : {
			"connection":{
				"retries": 1
			},
			"query": {
				"uri.field.case.insensitive": true,
				"text.field.case.insensitive.eq.match": true
			}
		}
	},
	"meta": {
		"skip-on": {
			"postgres": "PostgreSQL requires \"citext\" otherwise it returns with \"Error: 42704 ERROR:  type \"citext\" does not exist\"",
			"sqlite": "NOCASE is not supported"
		},
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}