summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json161
1 files changed, 161 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json
new file mode 100644
index 00000000..4dbcfde9
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/s-0008.json
@@ -0,0 +1,161 @@
+{
+ "description": "Test `Special:Browse` output for `_dat`, `_boo`, `_sobj`, `_uri` (`wgContLang=en`, `wgLang=es`, skip-on 1.25.6)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has date",
+ "contents": "[[Has type::Date]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has boolean",
+ "contents": "[[Has type::Boolean]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has number",
+ "contents": "[[Has type::Number]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has atomic mass unit",
+ "contents": "[[Has type::Quantity]] [[Corresponds to::1 u]] [[Corresponds to::1.660539040e-27 kg]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "Has url",
+ "contents": "[[Has type::URL]]"
+ },
+ {
+ "page": "Example/S0008/1",
+ "contents": "[[Has date::12 Jan 1991 8:56]] [[Has boolean::true]] [[Category:S0008]]"
+ },
+ {
+ "page": "Example/S0008/2",
+ "contents": "[[Has number::0.00000000000012]] [[Has number::72.769482308]] [[Has number::1.334e-13]] [[Category:S0008]]"
+ },
+ {
+ "page": "Example/S0008/3 (Hydrogen-1 atom)",
+ "contents": "[[Has atomic mass unit::1.007825 u]] [[Category:S0008]]"
+ },
+ {
+ "page": "Example/S0008/4",
+ "contents": "{{#subobject:ABC::DEF|Has number=123}}"
+ },
+ {
+ "page": "Example/S0008/5",
+ "contents": "[[Has url::http://example.org/some1::23:334/::56]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "special",
+ "about": "#0",
+ "special-page": {
+ "page": "Browse",
+ "query-parameters": "Example/S0008/1",
+ "request-parameters": {
+ "output": "legacy"
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ "<span class=\"smwb-value\">verdadero&#160;&#160;",
+ "SearchByProperty/:Has-20boolean/true",
+ "<span class=\"smwb-value\">08:56:00 12 ene 1991&#160;&#160;"
+ ]
+ }
+ },
+ {
+ "type": "special",
+ "about": "#1 (numbers)",
+ "special-page": {
+ "page": "Browse",
+ "query-parameters": "Example/S0008/2",
+ "request-parameters": {
+ "output": "legacy"
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ "<span class=\"smwb-value\">1,2e-13&#160;&#160;",
+ "<span class=\"smwb-value\">72,769&#160;&#160;",
+ "<span class=\"smwb-value\">1,334e-13&#160;&#160;",
+ "Special:SearchByProperty/:Has-20number/1.2e-2D13",
+ "Special:SearchByProperty/:Has-20number/72.769482308",
+ "Special:SearchByProperty/:Has-20number/1.334e-2D13"
+ ]
+ }
+ },
+ {
+ "type": "special",
+ "about": "#2 (quantity)",
+ "special-page": {
+ "page": "Browse",
+ "query-parameters": "Example/S0008/3 (Hydrogen-1 atom)",
+ "request-parameters": {
+ "output": "legacy"
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ "<span class=\"smwb-value\">1,008&#160;u (1,673533e-27&#160;kg)&#160;&#160;",
+ "Special:SearchByProperty/:Has-20atomic-20mass-20unit/1.007825-20u"
+ ]
+ }
+ },
+ {
+ "type": "special",
+ "about": "#3 named subobject contains ::",
+ "special-page": {
+ "page": "Browse",
+ "query-parameters": ":Example-2FS0008-2F4-23ABC::DEF",
+ "request-parameters": {
+ "output": "legacy"
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ "<span class=\"smwb-value\">123&#160;&#160;",
+ "Special:SearchByProperty/:Has-20number/123"
+ ]
+ }
+ },
+ {
+ "type": "special",
+ "about": "#4 url contains :: (encoded with -3A)",
+ "special-page": {
+ "page": "Browse",
+ "query-parameters": "Example/S0008/5",
+ "request-parameters": {
+ "output": "legacy"
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ "href=\"http://example.org/some1::23:334/::56\">http://example.org/some1::23:334/::56</a>&#160;&#160;",
+ "Special:SearchByProperty/:Has-20url/http-2D3A-2F-2Fexample.org-2Fsome1-2D3A-2D3A23-2D3A334-2F-2D3A-2D3A56"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "en",
+ "wgLang": "es",
+ "smwgPageSpecialProperties": [
+ "_MDAT"
+ ],
+ "smwgNamespacesWithSemanticLinks": {
+ "NS_MAIN": true,
+ "SMW_NS_PROPERTY": true
+ }
+ },
+ "meta": {
+ "skip-on": {
+ "mw-1.25.6": "Somehow the content lang is not set correctly on Travis (locally works fine)."
+ },
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file