summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/f-0805.json
blob: 55428e45a8c0eee88fef9f23b1d379b3ae54cc65 (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
{
	"description": "Test `format=template`, `format=plainlist` with `#show` and template args (#502)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has text",
			"contents": "[[Has type::Text]]"
		},
		{
			"namespace": "NS_TEMPLATE",
			"page": "Template/F0805_show_text",
			"contents": "<includeonly>{{{Has text}}}</includeonly>"
		},
		{
			"page": "Example/F0805/1",
			"contents": "[[Has text::123]]"
		},
		{
			"page": "Example/F0805/Q.1",
			"contents": "{{#show: Example/F0805/1 |?Has text |format=template |named args=yes |template=Template/F0805_show_text }}"
		},
		{
			"page": "Example/F0805/Q.2",
			"contents": "{{#show: Example/F0805/1 |?Has text |format=plainlist |named args=yes |template=Template/F0805_show_text }}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0 (#show, `format=template` to support template parameters)",
			"subject": "Example/F0805/Q.1",
			"assert-output": {
				"to-contain": [
					"123"
				]
			}
		},
		{
			"type": "parser",
			"about": "#1 (#show, `format=plainlist` to support template parameters)",
			"subject": "Example/F0805/Q.2",
			"assert-output": {
				"to-contain": [
					"123"
				]
			}
		}
	],
	"settings": {
		"smwgPageSpecialProperties": [
			"_MDAT"
		],
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}