aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/data/rlfilepath
diff options
context:
space:
mode:
authorBartosz Dziewoński <matma.rex@gmail.com>2017-03-17 03:14:05 +0100
committerBartosz Dziewoński <matma.rex@gmail.com>2019-07-10 22:08:14 +0200
commit77f4bab8b749ed43438cc77dd6b2330ef0f99b8a (patch)
tree465ede91496e1933c04e69a7291d8e4d01752321 /tests/phpunit/data/rlfilepath
parentd72f24589b3eece35b334d080e6e609b048fc22f (diff)
downloadmediawikicore-77f4bab8b749ed43438cc77dd6b2330ef0f99b8a.tar.gz
mediawikicore-77f4bab8b749ed43438cc77dd6b2330ef0f99b8a.zip
Allow skins/extensions to define custom OOUI themes
This change follows I39cc2a735d9625c87bf4ede6f5fb0ec441d47dcc. docs/extension.schema.v1.json docs/extension.schema.v2.json includes/registration/ExtensionProcessor.php * The new extension attribute 'OOUIThemePaths' can be used to define custom OOUI themes. See I9187a63e509b601b8558ea82850fa828e5c8cc0a for an example usage. includes/resourceloader/ResourceLoaderOOUIModule.php * Add support for 'OOUIThemePaths'. * Defining 'images' is now optional. I figure custom themes are unlikely to have or need them. * Use ResourceLoaderFilePath objects to allow skin-/extension-defined OOUI module files to use skin/extension's base paths. This was previously used to support $wgResourceModuleSkinStyles, but only for 'skinStyles' - now ResourceLoaderFileModule needs to also handle it for 'skinScripts', and ResourceLoaderImageModule for 'images'). includes/resourceloader/ResourceLoaderFilePath.php * Add getters for local/remote base paths, for when we need to construct a new ResourceLoaderFilePath based on existing one. includes/resourceloader/ResourceLoaderFileModule.php includes/resourceloader/ResourceLoaderImageModule.php includes/resourceloader/ResourceLoaderOOUIImageModule.php * Add or improve handling of ResourceLoaderFilePaths: * Replace `(array)` casts with explicit array wrapping, to avoid casting objects into associative arrays. * Use getLocalPath() instead of string concatenation. tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php tests/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php * Some basic checks for the above. Bug: T100896 Change-Id: I74362f0fc215b26f1f104ce7bdbbac1e106736ad
Diffstat (limited to 'tests/phpunit/data/rlfilepath')
-rw-r--r--tests/phpunit/data/rlfilepath/eye.svg1
-rw-r--r--tests/phpunit/data/rlfilepath/flag-ltr.svg1
-rw-r--r--tests/phpunit/data/rlfilepath/flag-rtl.svg1
-rw-r--r--tests/phpunit/data/rlfilepath/script.js1
-rw-r--r--tests/phpunit/data/rlfilepath/skinStyle.css3
-rw-r--r--tests/phpunit/data/rlfilepath/style.css3
-rw-r--r--tests/phpunit/data/rlfilepath/template.html1
7 files changed, 11 insertions, 0 deletions
diff --git a/tests/phpunit/data/rlfilepath/eye.svg b/tests/phpunit/data/rlfilepath/eye.svg
new file mode 100644
index 000000000000..be0c4e69d0e8
--- /dev/null
+++ b/tests/phpunit/data/rlfilepath/eye.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>eye</title><path d="M10 7.5a2.5 2.5 0 1 0 2.5 2.5A2.5 2.5 0 0 0 10 7.5zm0 7a4.5 4.5 0 1 1 4.5-4.5 4.5 4.5 0 0 1-4.5 4.5zM10 3C3 3 0 10 0 10s3 7 10 7 10-7 10-7-3-7-10-7z"/></svg> \ No newline at end of file
diff --git a/tests/phpunit/data/rlfilepath/flag-ltr.svg b/tests/phpunit/data/rlfilepath/flag-ltr.svg
new file mode 100644
index 000000000000..d19bed5371e3
--- /dev/null
+++ b/tests/phpunit/data/rlfilepath/flag-ltr.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>flag</title><path d="M17 6L3 1v18h2v-6.87L17 6z"/></svg> \ No newline at end of file
diff --git a/tests/phpunit/data/rlfilepath/flag-rtl.svg b/tests/phpunit/data/rlfilepath/flag-rtl.svg
new file mode 100644
index 000000000000..a58bb9242012
--- /dev/null
+++ b/tests/phpunit/data/rlfilepath/flag-rtl.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>flag</title><path d="M3 6l14-5v18h-2v-6.87L3 6z"/></svg> \ No newline at end of file
diff --git a/tests/phpunit/data/rlfilepath/script.js b/tests/phpunit/data/rlfilepath/script.js
new file mode 100644
index 000000000000..f5d7aa52abdb
--- /dev/null
+++ b/tests/phpunit/data/rlfilepath/script.js
@@ -0,0 +1 @@
+mw.test();
diff --git a/tests/phpunit/data/rlfilepath/skinStyle.css b/tests/phpunit/data/rlfilepath/skinStyle.css
new file mode 100644
index 000000000000..575d19f7b0e2
--- /dev/null
+++ b/tests/phpunit/data/rlfilepath/skinStyle.css
@@ -0,0 +1,3 @@
+body {
+ color: red;
+}
diff --git a/tests/phpunit/data/rlfilepath/style.css b/tests/phpunit/data/rlfilepath/style.css
new file mode 100644
index 000000000000..e87cc6abcd07
--- /dev/null
+++ b/tests/phpunit/data/rlfilepath/style.css
@@ -0,0 +1,3 @@
+body {
+ color: black;
+}
diff --git a/tests/phpunit/data/rlfilepath/template.html b/tests/phpunit/data/rlfilepath/template.html
new file mode 100644
index 000000000000..7c89b545c5ac
--- /dev/null
+++ b/tests/phpunit/data/rlfilepath/template.html
@@ -0,0 +1 @@
+<div></div>