summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0802.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0802.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0802.json160
1 files changed, 160 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0802.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0802.json
new file mode 100644
index 00000000..9dab306f
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0802.json
@@ -0,0 +1,160 @@
+{
+ "description": "Test `_INST`/`_SUBC` queries (#1005, en, skip virtuoso)",
+ "setup": [
+ {
+ "namespace": "NS_CATEGORY",
+ "page": "Foo",
+ "contents": ""
+ },
+ {
+ "namespace": "NS_CATEGORY",
+ "page": "Bar",
+ "contents": "[[Category:Foo]]"
+ },
+ {
+ "namespace": "NS_CATEGORY",
+ "page": "Bam",
+ "contents": "[[Category:Foo]]"
+ },
+ {
+ "page": "Page-annotated-with-subcategory",
+ "contents": "[[Category:Bar]] [[Category:Bam]]"
+ },
+ {
+ "page": "Page-annotated-with-another-subcategory",
+ "contents": "[[Category:Bam]]"
+ },
+ {
+ "page": "Page-annotated-with-supercategory-subcategory",
+ "contents": "[[Category:Foo]] [[Category:Bam]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "query",
+ "about": "#0 query pages with annotated category(subcategory)",
+ "condition": "[[Category:Bar]]",
+ "printouts": [
+ "_INST"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Page-annotated-with-subcategory#0##"
+ ],
+ "datavalues": [
+ {
+ "property": "_INST",
+ "value": "Bar"
+ }
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#1 disjuntive query for two categories",
+ "condition": "[[Category:Bar]] OR [[Category:Bam]]",
+ "printouts": [
+ "_INST"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Page-annotated-with-subcategory#0##",
+ "Page-annotated-with-another-subcategory#0##",
+ "Page-annotated-with-supercategory-subcategory#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#2 conjuntive query for two categories",
+ "condition": "[[Category:Bar]][[Category:Bam]]",
+ "printouts": [
+ "_INST"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Page-annotated-with-subcategory#0##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#3 find list of subcategories for selected super",
+ "condition": "[[Subcategory of::Category:Foo]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 2,
+ "results": [
+ "Bar#14##",
+ "Bam#14##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#4 find the super for a selected subcategory",
+ "condition": "[[-Subcategory of::Category:Bar]]",
+ "printouts": [],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 1,
+ "results": [
+ "Foo#14##"
+ ]
+ }
+ },
+ {
+ "type": "query",
+ "about": "#5 disjuntive query for two categories",
+ "condition": "[[Category:Foo]] OR [[Category:Bam]]",
+ "printouts": [
+ "_INST"
+ ],
+ "parameters": {
+ "limit": "10"
+ },
+ "assert-queryresult": {
+ "count": 3,
+ "results": [
+ "Page-annotated-with-subcategory#0##",
+ "Page-annotated-with-another-subcategory#0##",
+ "Page-annotated-with-supercategory-subcategory#0##"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "smwgNamespacesWithSemanticLinks": {
+ "NS_MAIN": true,
+ "NS_CATEGORY": true,
+ "SMW_NS_PROPERTY": true
+ },
+ "wgContLang": "en",
+ "smwgQSubcategoryDepth": 10
+ },
+ "meta": {
+ "skip-on": {
+ "virtuoso": "Virtuoso 6.1 rdfs / subproperty/subcategory hierarchies are not supported"
+ },
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file