summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0301.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0301.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0301.json62
1 files changed, 62 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0301.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0301.json
new file mode 100644
index 00000000..e23bfc11
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0301.json
@@ -0,0 +1,62 @@
+{
+ "description": "Test #subobject category annotation (#1172)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has page",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "page": "Example/0301/1",
+ "contents": "{{#subobject:|Has page={{PAGENAME}}|@category=ABC;123|+sep=;}}"
+ }
+ ],
+ "tests": [
+ {
+ "type": "parser",
+ "about": "#0 #subobject with category annotation",
+ "subject": "Example/0301/1#_04284bb237a62f6648c369d713da3996",
+ "assert-store": {
+ "semantic-data": {
+ "strictPropertyValueMatch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "Has_page",
+ "_SKEY",
+ "_INST"
+ ],
+ "propertyValues": [
+ "Example/0301/1",
+ "ABC",
+ "123"
+ ]
+ }
+ }
+ },
+ {
+ "type": "query",
+ "about": "#0 query with subobject category",
+ "condition": "[[Category:ABC]][[Has page::Example/0301/1]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "results": [
+ "Example/0301/1#0##_04284bb237a62f6648c369d713da3996"
+ ],
+ "count": "1"
+ }
+ }
+ ],
+ "settings": {
+ "smwgPageSpecialProperties": [
+ "_MDAT"
+ ]
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file