gplx/mediawiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0008.json

89 lines
2.7 KiB
JSON

{
"description": "Test RDF output generation on pages that contain incoming error annotations (`wgContLang=en`, `wgLang=es`, syntax=rdf/turtle)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Has area without unit",
"contents": "[[Has type::Quantity]]"
},
{
"page": "Example/R0008/1",
"contents": "[[Has area without unit::1 m]]"
}
],
"tests": [
{
"type": "rdf",
"about": "#0 incoming (error) is exported in canonical form (especially when user language is different)",
"exportcontroller": {
"print-pages": [
"Property:Has area without unit"
],
"parameters": {
"backlinks": true,
"recursion": "1",
"revisiondate": false
}
},
"assert-output": {
"to-contain": [
"<owl:DatatypeProperty rdf:about=\"http://example.org/id/Property-3AHas_area_without_unit\">",
"<rdfs:label>Has area without unit</rdfs:label>",
"<swivt:wikiPageSortKey rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Has area without unit</swivt:wikiPageSortKey>",
"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_qty\"/>"
],
"not-contain": [
"<owl:ObjectProperty rdf:about=\"http://example.org/id/Property-3ATiene_valor_incorrecto_para\">",
"<swivt:wikiPageSortKey rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Tiene valor incorrecto para</swivt:wikiPageSortKey>"
]
}
},
{
"type": "rdf",
"about": "#1 (turtle)",
"exportcontroller": {
"syntax": "turtle",
"print-pages": [
"Property:Has area without unit"
],
"parameters": {
"backlinks": true,
"recursion": "1",
"revisiondate": false
}
},
"assert-output": {
"to-contain": [
"property:Has_area_without_unit",
"rdf:type owl:DatatypeProperty ;",
"rdfs:label \"Has area without unit\" ;",
"swivt:wikiNamespace \"102\"^^xsd:integer ;",
"swivt:wikiPageSortKey \"Has area without unit\" ;",
"swivt:type <http://semantic-mediawiki.org/swivt/1.0#_qty> .",
"<http://example.org/id/Example/R0008/1-23_ERR3b4d92de525df0eeb65e83ea06e2a5d4>",
"swivt:masterPage <http://example.org/id/Example/R0008/1> ;",
"property:Has_improper_value_for property:Has_area_without_unit ;"
]
}
}
],
"settings": {
"smwgExportBCNonCanonicalFormUse": false,
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"NS_CATEGORY": true,
"SMW_NS_PROPERTY": true
},
"wgContLang": "en",
"wgLang": "es",
"smwgNamespace": "http://example.org/id/"
},
"meta": {
"skip-on": {
"mediawiki": [ ">1.42.x", "Skipping, broken due to missing 4, 5, 6 in #1" ]
},
"version": "2",
"is-incomplete": false,
"debug": false
}
}