diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0620.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0620.json | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0620.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0620.json new file mode 100644 index 00000000..b73064f7 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0620.json @@ -0,0 +1,134 @@ +{ + "description": "Test `_wpg` and category using subquery construct", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has page", + "contents": "[[Has type::Page]]" + }, + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has page", + "contents": "[[Has type::Page]]" + }, + { + "page": "Q0620/1", + "contents": "[[Has page::Q0620/1]] [[Category:Q0620]]" + }, + { + "page": "Q0620/2", + "contents": "[[Category:Q0620]]" + }, + { + "page": "Q0620/3", + "contents": "[[Has page::Q0620/1]]" + } + ], + "tests": [ + { + "type": "query", + "about": "#0 (match all with `Has page::Q0620/1`)", + "condition": "[[Has page::<q>[[Category:Q0620]]</q>]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Q0620/1#0##", + "Q0620/3#0##" + ] + } + }, + { + "type": "query", + "about": "#1", + "condition": "[[Has page::<q>[[Category:Q0620]]</q>]] [[Category:Q0620]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Q0620/1#0##" + ] + } + }, + { + "type": "query", + "about": "#2", + "condition": "[[Has page::<q>[[Has page::<q>[[Category:Q0620]]</q>]]</q>]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Q0620/1#0##", + "Q0620/3#0##" + ] + } + }, + { + "type": "query", + "about": "#3", + "condition": "[[Has page::<q>[[Has page::<q>[[Category:Q0620]]</q>]]</q>]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Q0620/1#0##", + "Q0620/3#0##" + ] + } + }, + { + "type": "query", + "about": "#4", + "condition": "[[Has page.Has page::<q>[[Category:Q0620]]</q>]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 2, + "results": [ + "Q0620/1#0##", + "Q0620/3#0##" + ] + } + }, + { + "type": "query", + "about": "#5", + "skip-on": { + "elastic": [ "not", "`Category:!` only works with ES." ] + }, + "condition": "[[Has page::<q>[[Has page::<q>[[Category:Q0620]]</q>]]</q>]] [[Category:!Q0620]]", + "printouts": [], + "parameters": { + "limit": "10" + }, + "assert-queryresult": { + "count": 1, + "results": [ + "Q0620/3#0##" + ] + } + } + ], + "settings": { + "smwgQSubcategoryDepth": 10 + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |