summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0001.json
blob: fc16ab4d8517d4912708095fb9bd17b4ebf26edc (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
{
	"description": "Test RDF output for `_txt`/`_wpg`/`_dat` (#881)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has text property for rdf",
			"contents": "[[Has type::Text]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has page property for rdf",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has date property for rdf",
			"contents": "[[Has type::Date]]"
		},
		{
			"page": "Rdf-1",
			"contents": "[[Has page property for rdf::Test one]] [[Has text property for rdf::Test one]]"
		},
		{
			"page": "Rdf-2",
			"contents": "[[Has page property for rdf::Test two]] [[Has text property for rdf::Test two]]"
		},
		{
			"page": "Rdf-3",
			"contents": "{{#subobject:|Has page property for rdf=I--11--O|@sortkey=X99Y}} {{#subobject:Caractères spéciaux|Has text property for rdf={({[[&,,;-]]})} }}"
		},
		{
			"page": "Rdf-4",
			"contents": "[[Has date property for rdf::31/12/2014]] {{#subobject:|Has date property for rdf=1/1/1970}}"
		},
		{
			"page": "Rdf-5",
			"contents": "Not permitted to use [[Has subobject::foo]] {{DEFAULTSORT:AA-BB-CC}}"
		}
	],
	"tests": [
		{
			"type": "rdf",
			"about": "#0 Single subject output",
			"exportcontroller": {
				"print-pages": [
					"Rdf-1"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<property:Has_page_property_for_rdf rdf:resource=\"&wiki;Test_one\"/>",
					"<property:Has_text_property_for_rdf rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Test one</property:Has_text_property_for_rdf>",
					"<swivt:wikiPageSortKey rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Rdf-1</swivt:wikiPageSortKey>",
					"<owl:ObjectProperty rdf:about=\"http://example.org/id/Property-3AHas_page_property_for_rdf\" />",
					"<owl:DatatypeProperty rdf:about=\"http://example.org/id/Property-3AHas_text_property_for_rdf\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#1",
			"exportcontroller": {
				"print-pages": [
					"Rdf-1",
					"Rdf-2"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D1\">",
					"<rdfs:label>Rdf-1</rdfs:label>",
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D2\">",
					"<rdfs:label>Rdf-2</rdfs:label>"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#2 Output for anonymous and named subobject",
			"exportcontroller": {
				"print-pages": [
					"Rdf-3"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D3\">",
					"<property:Has_subobject-23aux rdf:resource=\"&wiki;Rdf-2D3-23_c14ce3099ebd07ab500052b8c661832f\"/>",
					"<property:Has_subobject-23aux rdf:resource=\"&wiki;Rdf-2D3-23Caract-C3-A8res_sp-C3-A9ciaux\"/>",
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D3-23_c14ce3099ebd07ab500052b8c661832f\">",
					"<property:Has_page_property_for_rdf rdf:resource=\"&wiki;I-2D-2D11-2D-2DO\"/>",
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D3-23Caract-C3-A8res_sp-C3-A9ciaux\">",
					"<property:Has_text_property_for_rdf rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">{({[[&amp;,,;-]]})}</property:Has_text_property_for_rdf>",
					"<owl:ObjectProperty rdf:about=\"http://example.org/id/Property-3AHas_subobject-23aux\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#3 Date output",
			"exportcontroller": {
				"print-pages": [
					"Rdf-4"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D4\">",
					"<property:Has_date_property_for_rdf rdf:datatype=\"http://www.w3.org/2001/XMLSchema#date\">2014-12-31Z</property:Has_date_property_for_rdf>",
					"<property:Has_date_property_for_rdf-23aux rdf:datatype=\"http://www.w3.org/2001/XMLSchema#double\">2457022.5</property:Has_date_property_for_rdf-23aux>",
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D4-23_2c6937c91895c958f837a25691dd53c0\">",
					"<property:Has_date_property_for_rdf rdf:datatype=\"http://www.w3.org/2001/XMLSchema#date\">1970-01-01Z</property:Has_date_property_for_rdf>",
					"<property:Has_date_property_for_rdf-23aux rdf:datatype=\"http://www.w3.org/2001/XMLSchema#double\">2440587.5</property:Has_date_property_for_rdf-23aux>",
					"<owl:DatatypeProperty rdf:about=\"http://example.org/id/Property-3AHas_date_property_for_rdf\" />",
					"<owl:DatatypeProperty rdf:about=\"http://example.org/id/Property-3AHas_date_property_for_rdf-23aux\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#4 Property output, see #795",
			"exportcontroller": {
				"print-pages": [
					"Property:Has text property for rdf",
					"Property:Has page property for rdf",
					"Property:Has date property for rdf"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<owl:DatatypeProperty rdf:about=\"http://example.org/id/Property-3AHas_text_property_for_rdf\">",
					"<rdfs:label>Has text property for rdf</rdfs:label>",
					"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_txt\"/>",
					"<owl:ObjectProperty rdf:about=\"http://example.org/id/Property-3AHas_page_property_for_rdf\">",
					"<rdfs:label>Has page property for rdf</rdfs:label>",
					"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_wpg\"/>",
					"<owl:DatatypeProperty rdf:about=\"http://example.org/id/Property-3AHas_date_property_for_rdf\">",
					"<rdfs:label>Has date property for rdf</rdfs:label>",
					"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_dat\"/>",
					"<owl:ObjectProperty rdf:about=\"http://semantic-mediawiki.org/swivt/1.0#type\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#5 Check for proper output despite the use of [[Has subobject:: ... ]] as annotation",
			"exportcontroller": {
				"print-pages": [
					"Rdf-5"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<swivt:Subject rdf:about=\"http://example.org/id/Rdf-2D5\">",
					"<rdfs:label>Rdf-5</rdfs:label>",
					"<swivt:wikiPageSortKey rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">AA-BB-CC</swivt:wikiPageSortKey>"
				]
			}
		}
	],
	"settings": {
		"smwgExportBCAuxiliaryUse": true,
		"smwgNamespace": "http://example.org/id/",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"NS_HELP": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}