summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0009.json
blob: 70c1f55f06ceb43412f3a29c3fe40ceb44e3731e (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
{
	"description": "Test output in `Special:Search` for SMWSearch (`wgLanguageCode=en`, `wgContLang=en`, `wgSearchType=SMWSearch`)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has text",
			"contents": "[[Has type::Text]]"
		},
		{
			"page": "Example/S0009/1",
			"contents": "[[Has text::Some text to search]]"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0",
			"subject": "Example/S0009/1",
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 3,
					"propertyKeys": [
						"_SKEY",
						"_MDAT",
						"Has_text"
					],
					"propertyValues": [
						"Some text to search"
					]
				}
			}
		},
		{
			"type": "special",
			"about": "#1 results matched by the SMWSearch extension",
			"special-page": {
				"page": "Search",
				"query-parameters": "",
				"request-parameters": {
					"search": "[[Has text::~*Some text*]]"
				}
			},
			"assert-output": {
				"to-contain": [
					"<ul class='mw-search-results'>",
					"Example/S0009/1"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLanguageCode": "en",
		"wgSearchType": "SMWSearch",
		"wgCapitalLinks" : true,
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}