diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0701.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0701.json | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0701.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0701.json new file mode 100644 index 00000000..58bfddfc --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0701.json @@ -0,0 +1,76 @@ +{ + "description": "Test to create inverted annotation using a #ask/template combination (#711, `import-annotation=true`)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Located in", + "contents": "[[Has type::Page]]" + }, + { + "namespace": "SMW_NS_PROPERTY", + "page": "Location of", + "contents": "[[Has type::Page]]" + }, + { + "namespace": "NS_TEMPLATE", + "page": "Location", + "contents": "<includeonly>[[Located in::{{{Located in}}}]]</includeonly>" + }, + { + "namespace": "NS_TEMPLATE", + "page": "InvertPropertySetter", + "contents": "<includeonly>{{#set:|{{{#userparam}}}={{{1}}} }}</includeonly>" + }, + { + "namespace": "NS_TEMPLATE", + "page": "InvertPropertyDeclarator", + "contents": "<includeonly>{{#ask:[[{{{1}}}::{{PAGENAME}}]]|link=none|sep=|template=InvertPropertySetter|userparam={{{2}}}|format=template|import-annotation=true}}</includeonly>" + }, + { + "page": "Belgium", + "contents": "{{Location|Located in=Europe}}" + }, + { + "page": "Italy", + "contents": "{{Location|Located in=Europe}}" + }, + { + "page": "Europe", + "contents": "{{InvertPropertyDeclarator|Located in|Location of}}" + } + ], + "tests": [ + { + "type": "parser", + "about": "#0 inverse annotation", + "subject": "Europe", + "assert-store": { + "semantic-data": { + "strictPropertyValueMatch": false, + "propertyCount": 4, + "propertyKeys": [ + "_SKEY", + "_MDAT", + "Location_of", + "_ASK" + ], + "propertyValues": [ + "Italy", + "Belgium" + ] + } + } + } + ], + "settings": { + "wgCapitalLinks": true, + "smwgPageSpecialProperties": [ + "_MDAT" + ] + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |