summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0018.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0018.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0018.json93
1 files changed, 93 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0018.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0018.json
new file mode 100644
index 00000000..6491a23c
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0018.json
@@ -0,0 +1,93 @@
+{
+ "description": "Test `Special:Ask` common output (`wgContLang=en`, `wgLang=en`)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has page",
+ "contents": "[[Has type::Page]]"
+ },
+ {
+ "namespace": "NS_MAIN",
+ "page": "Example/S0018/1",
+ "contents": "[[Has page::123]] [[Category:S0018]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "special",
+ "about": "#0 (noscript)",
+ "special-page": {
+ "page": "Ask",
+ "query-parameters": [],
+ "request-parameters": {}
+ },
+ "assert-output": {
+ "to-contain": [
+ "<div id=\"ask-status\" class=\"smw-ask-status plainlinks\"><noscript><div class=\"smw-callout smw-callout-error\">"
+ ]
+ }
+ },
+ {
+ "type": "special",
+ "about": "#1 (@see #3542, `format= table`)",
+ "special-page": {
+ "page": "Ask",
+ "query-parameters": "-5B-5BCategory:S0018-5D-5D/-3FHas-20page/mainlabel%3D/offset%3D0/format%3D-20table",
+ "request-parameters": {}
+ },
+ "assert-output": {
+ "to-contain": [
+ "{{#ask: [[Category:S0018]]",
+ " |?Has page",
+ " |format=table",
+ " |limit=50",
+ " |offset=0",
+ " |sort=",
+ " |order=asc",
+ " |mainlabel=",
+ "}}"
+ ]
+ }
+ },
+ {
+ "type": "special",
+ "about": "#2 (`format=TABLE`)",
+ "special-page": {
+ "page": "Ask",
+ "query-parameters": "-5B-5BCategory:S0018-5D-5D/-3FHas-20page/mainlabel%3D/offset%3D0/format%3DTABLE",
+ "request-parameters": {}
+ },
+ "assert-output": {
+ "to-contain": [
+ "{{#ask: [[Category:S0018]]",
+ " |?Has page",
+ " |format=table",
+ " |limit=50",
+ " |offset=0",
+ " |sort=",
+ " |order=asc",
+ " |mainlabel=",
+ "}}"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "en",
+ "wgLang": "en",
+ "wgLanguageCode": "en",
+ "smwgNamespace": "http://example.org/id/",
+ "smwgPageSpecialProperties": [
+ "_MDAT"
+ ],
+ "smwgNamespacesWithSemanticLinks": {
+ "NS_MAIN": true,
+ "SMW_NS_PROPERTY": true
+ }
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+}