diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0003.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0003.json | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0003.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0003.json new file mode 100644 index 00000000..a4fb17c6 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0003.json @@ -0,0 +1,131 @@ +{ + "description": "Test `Special:Ask` output for `format=rdf`/`format=json`/DISPLAYTITLE (#1453, #1619, `wgRestrictDisplayTitle`, `wgContLang=en`)", + "setup": [ + { + "namespace": "SMW_NS_PROPERTY", + "page": "Has boolean", + "contents": "[[Has type::Boolean]]" + }, + { + "page": "Example/S0003/1", + "contents": "[[Has boolean::true]] [[Category:S0003]]" + }, + { + "page": "Example/S0003/2", + "contents": "{{DISPLAYTITLE:FOO-S0003}} [[Category:S0003]]" + }, + { + "page": "Example/S0003/Q1", + "contents": "{{#ask: [[Category:S0003]] |?Category |?Has boolean=Text |link=none |format=rdf }}" + } + ], + "tests": [ + { + "type": "parser", + "about": "#0", + "subject": "Example/S0003/Q1", + "assert-store": { + "semantic-data": { + "strictPropertyValueMatch": false, + "propertyCount": 3, + "propertyKeys": [ + "_MDAT", + "_SKEY", + "_ASK" + ], + "propertyValues": [] + } + }, + "assert-output": { + "to-contain": [ + "-5B-5BCategory:S0003-5D-5D/-3FCategory/-3FHas-20boolean=Text/mainlabel=/limit=100/offset=0/format=rdf/link=none\">RDF</a>" + ] + } + }, + { + "type": "special", + "about": "#1", + "special-page": { + "page": "Ask", + "query-parameters": "-5B-5BCategory:S0003-5D-5D/-3FCategory/-3FHas-20boolean=Text/mainlabel=/limit=100/offset=0/format=rdf/link=none", + "request-parameters": [] + }, + "assert-output": { + "to-contain": [ + "<rdfs:label>Example/S0003/1</rdfs:label>", + "<property:Has_boolean rdf:datatype=\"http://www.w3.org/2001/XMLSchema#boolean\">true</property:Has_boolean>", + "<swivt:type rdf:resource=\"http://example.org/id/Category-3AS0003\"/>" + ] + } + }, + { + "type": "special", + "about": "#2", + "skip-on": { + "mw-1.19.20": "Skipping because of spaces in output fields being different", + "mw-1.22.12": "Skipping because of spaces in output fields being different" + }, + "special-page": { + "page": "Ask", + "query-parameters": "-5B-5BCategory:S0003-5D-5D/-3FCategory/-3FHas-20boolean=Text/mainlabel=/limit=100/offset=0/format=json/unescape=true/prettyprint=true/link=none", + "request-parameters": [] + }, + "assert-output": { + "to-contain": [ + "\"fulltext\": \"Category:S0003\"", + "\"fulltext\": \"Example/S0003/1\"", + "\"key\": \"Has_boolean\"" + ] + } + }, + { + "type": "special", + "about": "#3 (link=subject)", + "special-page": { + "page": "Ask", + "query-parameters": "-5B-5BCategory:S0003-5D-5D/mainlabel=/offset=0/format=table/link=subject", + "request-parameters": [] + }, + "assert-output": { + "to-contain": [ + "FOO-S0003" + ] + } + }, + { + "type": "special", + "about": "#4 (link=none)", + "special-page": { + "page": "Ask", + "query-parameters": "-5B-5BCategory:S0003-5D-5D/mainlabel=/offset=0/format=table/link=none", + "request-parameters": [] + }, + "assert-output": { + "to-contain": [ + "Example/S0003/2" + ], + "not-contain": [ + "FOO-S0003" + ] + } + } + ], + "settings": { + "wgContLang": "en", + "wgLanguageCode": "en", + "wgRestrictDisplayTitle": false, + "smwgNamespace": "http://example.org/id/", + "smwgPageSpecialProperties": [ + "_MDAT" + ], + "smwgNamespacesWithSemanticLinks": { + "NS_MAIN": true, + "SMW_NS_PROPERTY": true + } + }, + "meta": { + "version": "2", + "is-incomplete": false, + "debug": false + } +}
\ No newline at end of file |