diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0915.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0915.json | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0915.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0915.json new file mode 100644 index 00000000..413e9740 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0915.json @@ -0,0 +1,112 @@ +{ + "description": "Test category redirect (`SMW_CAT_REDIRECT`)", + "setup": [ + { + "namespace": "NS_CATEGORY", + "page": "Example/P0915", + "contents": "#REDIRECT [[Example/P0915/1]]" + }, + { + "namespace": "NS_CATEGORY", + "page": "Example/P0915/SubCat", + "contents": "[[Category:Example/P0915]]" + }, + { + "namespace": "NS_CATEGORY", + "page": "Example/P0915/ValidCat", + "contents": "#REDIRECT [[:Category:Example/P0915/ValidCat2]]" + }, + { + "page": "Example/P0915/1", + "contents": "[[Category:Example/P0915]]" + }, + { + "page": "Example/P0915/2", + "contents": "[[Category:Example/P0915/ValidCat]]" + } + ], + "tests": [ + { + "type": "parser", + "about": "#0 track category with invalid (NS_MAIN) redirect target", + "subject": "Example/P0915/1", + "store": { + "clear-cache": true + }, + "assert-store": { + "semantic-data": { + "strictPropertyValueMatch": false, + "propertyCount": 3, + "propertyKeys": [ + "_SKEY", + "_MDAT", + "_ERRC" + ], + "incoming": { + "propertyKeys": [ + "_REDI" + ] + } + } + } + }, + { + "type": "parser", + "about": "#1 track sub-category", + "namespace": "NS_CATEGORY", + "subject": "Example/P0915/SubCat", + "assert-store": { + "semantic-data": { + "strictPropertyValueMatch": false, + "propertyCount": 3, + "propertyKeys": [ + "_SKEY", + "_MDAT", + "_ERRC" + ] + } + } + }, + { + "type": "parser", + "about": "#2 valid cat redirect, dsiplay the redirect target", + "subject": "Example/P0915/2", + "assert-store": { + "semantic-data": { + "strictPropertyValueMatch": false, + "propertyCount": 3, + "propertyKeys": [ + "_SKEY", + "_MDAT", + "_INST" + ], + "propertyValues": [ + "Example/P0915/ValidCat2#14##" + ] + } + } + } + ], + "settings": { + "wgContLang": "en", + "wgLang": "en", + "smwgCategoryFeatures": [ + "SMW_CAT_INSTANCE", + "SMW_CAT_REDIRECT", + "SMW_CAT_HIERARCHY" + ], + "smwgPageSpecialProperties": [ + "_MDAT" + ], + "smwgNamespacesWithSemanticLinks": { + "NS_MAIN": true, + "NS_CATEGORY": true, + "SMW_NS_PROPERTY": true + } + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +} |