summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0604.json
blob: c2ffd25aa09ccceaa4a67fc87fb79c2ec4402f9a (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
{
	"description": "Test `_wpg` queries to resolve property/values redirects (#467, skip virtuoso)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has firstPage",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has secondPage",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "PropertyToBeRedirected",
			"contents": "#REDIRECT [[Property:Has firstPage]]"
		},
		{
			"page": "PageValueToBeRedirected",
			"contents": "#REDIRECT [[PageRedirectTarget]]"
		},
		{
			"page": "AnotherPageValueToBeRedirected",
			"contents": "#REDIRECT [[AnotherPageRedirectTarget]]"
		},
		{
			"page": "Page-one",
			"contents": "[[PropertyToBeRedirected::One]]"
		},
		{
			"page": "Page-two",
			"contents": "{{#subobject:PropertyToBeRedirected=Two}}"
		},
		{
			"page": "Page-three",
			"contents": "[[Has secondPage::PageValueToBeRedirected]]"
		},
		{
			"page": "Page-four",
			"contents": "{{#subobject:Has secondPage=PageValueToBeRedirected}}"
		},
		{
			"page": "Page-five-combined",
			"contents": "[[PropertyToBeRedirected::PageValueToBeRedirected]]"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0 any value query for redirected property",
			"condition": "[[PropertyToBeRedirected::+]]",
			"printouts": [
				"PropertyToBeRedirected",
				"Has firstPage"
			],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 3,
				"results": [
					"Page-one#0##",
					"Page-two#0##_b60804b67d37b781ac15c6e78102d13c",
					"Page-five-combined#0##"
				],
				"datavalues": [
					{
						"property": "PropertyToBeRedirected",
						"value": "One"
					},
					{
						"property": "PropertyToBeRedirected",
						"value": "Two"
					},
					{
						"property": "PropertyToBeRedirected",
						"value": "PageValueToBeRedirected"
					}
				]
			}
		},
		{
			"type": "query",
			"about": "#1 any value query for redirected value",
			"condition": "[[Has secondPage::+]]",
			"printouts": [
				"Has secondPage"
			],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Page-three#0##",
					"Page-four#0##_f5bb3e35482aaa5d1eef24749c24af30"
				],
				"datavalues": [
					{
						"property": "Has secondPage",
						"value": "PageValueToBeRedirected"
					},
					{
						"property": "Has secondPage",
						"value": "PageValueToBeRedirected"
					}
				]
			}
		},
		{
			"type": "query",
			"about": "#2 disjunction query on discrete value search",
			"condition": "[[PropertyToBeRedirected::One]] OR [[PropertyToBeRedirected::Two]] OR [[Has secondPage::PageValueToBeRedirected]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 4,
				"results": [
					"Page-one#0##",
					"Page-two#0##_b60804b67d37b781ac15c6e78102d13c",
					"Page-three#0##",
					"Page-four#0##_f5bb3e35482aaa5d1eef24749c24af30"
				]
			}
		},
		{
			"type": "query",
			"about": "#3 combined property/value redirect discrete value search",
			"condition": "[[PropertyToBeRedirected::PageValueToBeRedirected]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Page-five-combined#0##"
				]
			}
		},
		{
			"type": "query",
			"about": "#4 single value search, refs #1007",
			"condition": "[[:PageValueToBeRedirected]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"PageRedirectTarget#0##"
				]
			}
		},
		{
			"type": "query",
			"about": "#5 disjunctive single value search, refs #1007",
			"condition": "[[:PageValueToBeRedirected]] OR [[:AnotherPageValueToBeRedirected]] OR [[:Page-one]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 3,
				"results": [
					"PageRedirectTarget#0##",
					"AnotherPageRedirectTarget#0##",
					"Page-one#0##"
				]
			}
		}
	],
	"settings": {
		"smwgSparqlQFeatures": [
			"SMW_SPARQL_QF_REDI",
			"SMW_SPARQL_QF_SUBP",
			"SMW_SPARQL_QF_SUBC"
		]
	},
	"meta": {
		"skip-on": {
			"virtuoso": "Virtuoso 6.1 does not support property paths / SPARQL compiler, line 0: Invalid character in SPARQL expression at '^'"
		},
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}