diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1205.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1205.json | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1205.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1205.json new file mode 100644 index 00000000..ea54c467 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-1205.json @@ -0,0 +1,102 @@ +{ + "description": "Test `[[Has subobject::!]]` / `[[Has subobject::!+]]` (ES only)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has page", + "contents": "[[Has type::Page]]" + }, + { + "page": "Q1205/1", + "contents": "[[Has page::Q1205]] {{#subobject: |Has page=Q1205/1}} {{#subobject: |Has page=Q1205/2}}" + } + ], + "tests": [ + { + "type": "query", + "about": "#0", + "skip-on": { + "elastic": [ "not", "Only works with ES out of the box." ] + }, + "condition": "[[Has page::in:Q1205]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 3, + "results": [ + "Q1205/1#0##", + "Q1205/1#0##_05d38f45f2ea3d1167f4c7c0d52f82d2", + "Q1205/1#0##_da6807dde88fa7a579fd5beed7b182cd" + ] + } + }, + { + "type": "query", + "about": "#1 (Has subobject::!, match entities with no subobject)", + "skip-on": { + "elastic": [ "not", "Only works with ES out of the box." ] + }, + "condition": "[[Has page::in:Q1205]][[Has subobject::!]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Q1205/1#0##" + ] + } + }, + { + "type": "query", + "about": "#2 (Has subobject::+, those entities that poses a subobject)", + "skip-on": { + "elastic": [ "not", "Only works with ES out of the box." ] + }, + "condition": "[[Has page::in:Q1205]][[Has subobject::+]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Q1205/1#0##" + ] + } + }, + { + "type": "query", + "about": "#3 (Has subobject::!+, those entities that don't poses a subobject)", + "skip-on": { + "elastic": [ "not", "Only works with ES out of the box." ] + }, + "condition": "[[Has page::in:Q1205]][[Has subobject::!+]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Q1205/1#0##_05d38f45f2ea3d1167f4c7c0d52f82d2", + "Q1205/1#0##_da6807dde88fa7a579fd5beed7b182cd" + ] + } + } + ], + "settings": { + "smwgNamespacesWithSemanticLinks": { + "NS_MAIN": true, + "SMW_NS_PROPERTY": true + } + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |