summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0916.json
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0916.json')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0916.json62
1 files changed, 62 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0916.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0916.json
new file mode 100644
index 00000000..6244483a
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/p-0916.json
@@ -0,0 +1,62 @@
+{
+ "description": "Test `_ref_rec` with a `_eid` field (#2985)",
+ "setup": [
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "WDID",
+ "contents": "[[Has type::External identifier]][[External formatter uri::https://www.wikidata.org/entity/$1]]"
+ },
+ {
+ "namespace": "SMW_NS_PROPERTY",
+ "page": "WD reference",
+ "contents": "[[Has type::Reference]] [[Has fields::URL;WDID]]"
+ },
+ {
+ "page": "Example/P0916/1",
+ "contents": "[[WD reference::https://en.wikipedia.org/wiki/Franz_Schubert;Q7312]]"
+ }
+ ],
+ "tests": [
+ {
+ "type": "parser",
+ "about": "#0 (correct formatting for external identifier)",
+ "subject": "Example/P0916/1",
+ "assert-store": {
+ "semantic-data": {
+ "strict-mode-valuematch": false,
+ "propertyCount": 3,
+ "propertyKeys": [
+ "_MDAT",
+ "_SKEY",
+ "WD reference"
+ ]
+ }
+ },
+ "assert-output": {
+ "to-contain": [
+ "data-content=\"<ul><li><a href=".*:WDID"",
+ "title=".*:WDID">WDID</a>: <a href="https://www.wikidata.org/entity/Q7312" target="_blank">Q7312</a></li></ul>\" title=\"WDID: Q7312\">"
+ ],
+ "not-contain": [
+ "title=&quot;.*:WDID&quot;&gt;WDID&lt;/a&gt;: &lt;span class=&quot;plainlinks smw-eid&quot;&gt;<a rel=\"nofollow\" class=\"external text\" href=\"https://www.wikidata.org/entity/Q7312\">Q7312</a>&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;\" title=\"WDID: <a rel=\"nofollow\" class=\"external text\" href=\"https://www.wikidata.org/entity/Q7312\">Q7312</a>\">"
+ ]
+ }
+ }
+ ],
+ "settings": {
+ "wgContLang": "en",
+ "wgLang": "en",
+ "smwgPageSpecialProperties": [
+ "_MDAT"
+ ],
+ "smwgNamespacesWithSemanticLinks": {
+ "NS_MAIN": true,
+ "SMW_NS_PROPERTY": true
+ }
+ },
+ "meta": {
+ "version": "2",
+ "is-incomplete": false,
+ "debug": false
+ }
+} \ No newline at end of file