summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0901.json
blob: 59fcd3587252d8741bd1dd23d37dc42b4981258d (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
{
	"description": "Test #ask on moved redirected subject (#1086)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "HasPropertyForMove",
			"contents": "[[Has type::Page]]"
		},
		{
			"page": "Page/09/01/1",
			"contents": "[[HasPropertyForMove::ABC]]"
		},
		{
			"page": "Page/09/01/2",
			"contents": "[[HasPropertyForMove::ABC]]"
		},
		{
			"move-to": {
				"target": "Move/09/01/4",
				"is-redirect": false
			},
			"page": "Page/09/01/3",
			"contents": "[[HasPropertyForMove::ABC]]"
		},
		{
			"page": "Move/09/01/Query",
			"contents": "{{#ask:[[HasPropertyForMove::ABC]] |format=ul |link=none |headers=show }}"
		},
		{
			"move-to": {
				"target": "Redirect/09/01/2",
				"is-redirect": true
			},
			"page": "Redirect/09/01/1",
			"contents": "[[HasPropertyForMove::123]]"
		},
		{
			"page": "Redirect/09/01/3",
			"contents": "#REDIRECT [[Redirect/09/01/4]] [[HasPropertyForMove::123]]"
		},
		{
			"page": "Redirect/09/01/Query",
			"contents": "{{#ask:[[HasPropertyForMove::ABC]] OR [[HasPropertyForMove::123]] |format=ul |link=none |headers=show }}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0 includes move",
			"subject": "Move/09/01/Query",
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 3,
					"propertyKeys": [
						"_MDAT",
						"_SKEY",
						"_ASK"
					]
				}
			},
			"assert-output": {
				"to-contain": [
					"<li class=\"smw-row\"><span class=\"smw-field\"><span class=\"smw-value\">Page/09/01/1</span></span></li>",
					"<li class=\"smw-row\"><span class=\"smw-field\"><span class=\"smw-value\">Page/09/01/2</span></span></li>",
					"<li class=\"smw-row\"><span class=\"smw-field\"><span class=\"smw-value\">Move/09/01/4</span></span></li>"
				]
			}
		},
		{
			"type": "parser",
			"about": "#1 includes redirect",
			"subject": "Redirect/09/01/Query",
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 3,
					"propertyKeys": [
						"_MDAT",
						"_SKEY",
						"_ASK"
					]
				}
			},
			"assert-output": {
				"to-contain": [
					"<li class=\"smw-row\"><span class=\"smw-field\"><span class=\"smw-value\">Page/09/01/1</span></span></li>",
					"<li class=\"smw-row\"><span class=\"smw-field\"><span class=\"smw-value\">Page/09/01/2</span></span></li>",
					"<li class=\"smw-row\"><span class=\"smw-field\"><span class=\"smw-value\">Move/09/01/4</span></span></li>",
					"<li class=\"smw-row\"><span class=\"smw-field\"><span class=\"smw-value\">Redirect/09/01/2</span></span></li>"
				]
			}
		}
	],
	"settings": {
		"smwgPageSpecialProperties": [
			"_MDAT"
		],
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"skip-on": {
			"mw-master": "Skipping because redirect/move causes a failure in 1.27 (#1376) with the DeferredUpdate blocking succeeding tests"
		},
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}