summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0203.json
blob: 83e3367e0f17f22030de624129694fdbe900767b (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
{
	"description": "Test #set parser in combination with #subobject and template output (#1067, regression check)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Paragraph number",
			"contents": "[[Has type::Number]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Paragraph",
			"contents": "[[Has type::Text]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Paragraph backlink",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "NS_TEMPLATE",
			"page": "SimpleSetTemplate",
			"contents": "<includeonly>Lorem ipsum.{{#set:Reference=Test}}</includeonly>"
		},
		{
			"namespace": "NS_TEMPLATE",
			"page": "CreateParagraphAsSubobject",
			"contents": "<includeonly><div style=\"display:none;\">{{#subobject:|Paragraph number={{{Paragraph number|}}}|Paragraph={{{Paragraph|}}}|Paragraph backlink={{PAGENAME}} }}</div></includeonly>"
		},
		{
			"page": "Transclude-Template",
			"contents": "{{CreateParagraphAsSubobject|Paragraph number=1|Paragraph=Test1 {{SimpleSetTemplate}} }} {{SimpleSetTemplate}}"
		},
		{
			"page": "Ask-For-Transclude-Template",
			"contents": "{{#ask:[[Paragraph backlink::Transclude-Template]]|?Paragraph}}"
		}
	],
	"tests": [
		{
			"type": "parser",
			"about": "#0",
			"subject": "Transclude-Template",
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 4,
					"propertyKeys": [
						"_MDAT",
						"_SKEY",
						"Reference",
						"_SOBJ"
					],
					"propertyValues": [
						"Test",
						"Transclude-Template#_2d7f2b93bd6e9816ff85f022cddc62eb"
					]
				}
			}
		},
		{
			"type": "parser",
			"about": "#1 subobject check",
			"subject": "Transclude-Template#_2d7f2b93bd6e9816ff85f022cddc62eb",
			"assert-store": {
				"semantic-data": {
					"strictPropertyValueMatch": false,
					"propertyCount": 4,
					"propertyKeys": [
						"Paragraph",
						"Paragraph_backlink",
						"Paragraph_number",
						"_SKEY"
					],
					"propertyValues": [
						"1",
						"Test1 Lorem ipsum.",
						"Transclude-Template"
					]
				}
			}
		},
		{
			"type": "parser",
			"about": "#2 check for the ask output",
			"subject": "Ask-For-Transclude-Template",
			"assert-output": {
				"to-contain": [
					"title=\"Transclude-Template\">Transclude-Template</a>",
					"<td class=\"Paragraph smwtype_txt\">Test1 Lorem ipsum.</td>"
				]
			}
		}
	],
	"settings": {
		"smwgPageSpecialProperties": [
			"_MDAT"
		]
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}