summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0703.json
blob: c360aca11a7bb539a6faa70aab121c8f91adb6bf (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
{
	"description": "Test to map `Foaf` property from back-end / using a localized predefined property `A le type@fr` (en)",
	"setup": [
		{
			"namespace": "NS_MEDIAWIKI",
			"page": "Smw import foaf",
			"contents": "http://xmlns.com/foaf/0.1/|[http://www.foaf-project.org/ Friend Of A Friend]\n name|Type:Text\n homepage|Type:URL\n mbox|Type:Email\n mbox_sha1sum|Type:Text\n depiction|Type:URL\n phone|Type:Text\n Person|Category\n Organization|Category\n knows|Type:Page\n member|Type:Page\n"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Foaf:homepage",
			"contents": "[[Imported from::foaf:homepage]] [[Category:Import]]"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0",
			"condition": "[[Has type::+]] [[Category:Import]]",
			"printouts": [
				"Has type"
			],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Foaf:homepage#102##"
				],
				"datavalues": [
					{
						"property": "Has type",
						"value": "URL"
					}
				]
			}
		},
		{
			"type": "query",
			"about": "#1 (A le type@fr == Has type)",
			"condition": "[[A le type@fr::+]] [[Category:Import]]",
			"printouts": [
				"A le type@fr"
			],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Foaf:homepage#102##"
				],
				"datavalues": [
					{
						"property": "Has type",
						"value": "URL"
					}
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgNamespace": "http://example.org/id/",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}