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

92 lines
2.7 KiB
JSON

{
"description": "Test RDF output generation for `_INST`/`_SUBC` pages (#922, en)",
"setup": [
{
"namespace": "NS_CATEGORY",
"page": "Rdf-1-category",
"contents": "empty"
},
{
"namespace": "NS_CATEGORY",
"page": "Rdf-2-subcategory",
"contents": "[[Category:Rdf-1-category]]"
},
{
"namespace": "NS_CATEGORY",
"page": "Rdf-3-subsubcategory",
"contents": "[[Category:Rdf-2-subcategory]]"
}
],
"tests": [
{
"type": "rdf",
"about": "#0 cat-subcat export without backlinks",
"exportcontroller": {
"print-pages": [
"Category:Rdf-1-category",
"Category:Rdf-2-subcategory"
],
"parameters": {
"backlinks": false,
"recursion": "1",
"revisiondate": false
}
},
"assert-output": {
"to-contain": [
"<owl:Class rdf:about=\"http://example.org/id/Category-3ARdf-2D1-2Dcategory\">",
"<rdfs:label>Rdf-1-category</rdfs:label>",
"<owl:Class rdf:about=\"http://example.org/id/Category-3ARdf-2D2-2Dsubcategory\">",
"<rdfs:label>Rdf-2-subcategory</rdfs:label>",
"<rdfs:subClassOf rdf:resource=\"http://example.org/id/Category-3ARdf-2D1-2Dcategory\"/>"
]
}
},
{
"type": "rdf",
"about": "#1 cat-subcat export with backlinks (catches subsub-cat)",
"exportcontroller": {
"print-pages": [
"Category:Rdf-1-category",
"Category:Rdf-2-subcategory"
],
"parameters": {
"backlinks": true,
"recursion": "1",
"revisiondate": false
}
},
"assert-output": {
"to-contain": [
"<!ENTITY category 'http://example.org/id/Category-3A'>",
"<!ENTITY property 'http://example.org/id/Property-3A'>",
"<owl:Class rdf:about=\"http://example.org/id/Category-3ARdf-2D1-2Dcategory\">",
"<rdfs:label>Rdf-1-category</rdfs:label>",
"<owl:Class rdf:about=\"http://example.org/id/Category-3ARdf-2D2-2Dsubcategory\">",
"<rdfs:label>Rdf-2-subcategory</rdfs:label>",
"<rdfs:subClassOf rdf:resource=\"http://example.org/id/Category-3ARdf-2D1-2Dcategory\"/>",
"<owl:Class rdf:about=\"http://example.org/id/Category-3ARdf-2D3-2Dsubsubcategory\">",
"<rdfs:label>Rdf-3-subsubcategory</rdfs:label>",
"<rdfs:subClassOf rdf:resource=\"http://example.org/id/Category-3ARdf-2D2-2Dsubcategory\"/>",
"<owl:ObjectProperty rdf:about=\"http://example.org/id/Property-3ASubcategory_of\">",
"<rdfs:label>Subcategory of</rdfs:label>"
]
}
}
],
"settings": {
"smwgExportBCNonCanonicalFormUse": false,
"smwgNamespacesWithSemanticLinks": {
"NS_MAIN": true,
"NS_CATEGORY": true,
"SMW_NS_PROPERTY": true
},
"wgContLang": "en",
"smwgNamespace": "http://example.org/id/"
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}