summaryrefslogtreecommitdiff
path: root/tests/phpunit/data
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-12-17 09:15:42 +0100
committerPierre Schmitz <pierre@archlinux.de>2015-12-17 09:44:51 +0100
commita1789ddde42033f1b05cc4929491214ee6e79383 (patch)
tree63615735c4ddffaaabf2428946bb26f90899f7bf /tests/phpunit/data
parent9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff)
Update to MediaWiki 1.26.0
Diffstat (limited to 'tests/phpunit/data')
-rw-r--r--tests/phpunit/data/css/comments.css7
-rw-r--r--tests/phpunit/data/helpers/WellProtectedClass.php29
-rw-r--r--tests/phpunit/data/import/ImportLinkCacheIntegrationTest.xml43
-rw-r--r--tests/phpunit/data/less/common/test.common.mixins.less1
-rw-r--r--tests/phpunit/data/less/module/styles.css3
-rw-r--r--tests/phpunit/data/media/2_webp_a.webpbin0 -> 17128 bytes
-rw-r--r--tests/phpunit/data/media/2_webp_ll.webpbin0 -> 29360 bytes
-rw-r--r--tests/phpunit/data/media/srgb.jpgbin0 -> 7738 bytes
-rw-r--r--tests/phpunit/data/media/tinyrgb.iccbin0 -> 524 bytes
-rw-r--r--tests/phpunit/data/media/tinyrgb.jpgbin0 -> 5118 bytes
-rw-r--r--tests/phpunit/data/media/webp_animated.webpbin0 -> 380850 bytes
-rw-r--r--tests/phpunit/data/templates/bad_partial.mustache1
-rw-r--r--tests/phpunit/data/templates/has_partial.mustache1
13 files changed, 81 insertions, 4 deletions
diff --git a/tests/phpunit/data/css/comments.css b/tests/phpunit/data/css/comments.css
new file mode 100644
index 00000000..744a14c7
--- /dev/null
+++ b/tests/phpunit/data/css/comments.css
@@ -0,0 +1,7 @@
+/* url expressions in comments should be ignored */
+
+.selector { /*@noflip*/ background-image: /*@embed*/ url(not-commented.gif); }
+
+/*
+.selector { background-image: url(commented-out.gif); }
+*/
diff --git a/tests/phpunit/data/helpers/WellProtectedClass.php b/tests/phpunit/data/helpers/WellProtectedClass.php
index 99c7f642..a45cfbbf 100644
--- a/tests/phpunit/data/helpers/WellProtectedClass.php
+++ b/tests/phpunit/data/helpers/WellProtectedClass.php
@@ -1,20 +1,47 @@
<?php
-class WellProtectedClass {
+class WellProtectedParentClass {
+ private $privateParentProperty;
+
+ public function __construct() {
+ $this->privateParentProperty = 9000;
+ }
+
+ private function incrementPrivateParentPropertyValue() {
+ $this->privateParentProperty++;
+ }
+
+ public function getPrivateParentProperty() {
+ return $this->privateParentProperty;
+ }
+}
+
+class WellProtectedClass extends WellProtectedParentClass {
protected $property;
+ private $privateProperty;
public function __construct() {
+ parent::__construct();
$this->property = 1;
+ $this->privateProperty = 42;
}
protected function incrementPropertyValue() {
$this->property++;
}
+ private function incrementPrivatePropertyValue() {
+ $this->privateProperty++;
+ }
+
public function getProperty() {
return $this->property;
}
+ public function getPrivateProperty() {
+ return $this->privateProperty;
+ }
+
protected function whatSecondArg( $a, $b = false ) {
return $b;
}
diff --git a/tests/phpunit/data/import/ImportLinkCacheIntegrationTest.xml b/tests/phpunit/data/import/ImportLinkCacheIntegrationTest.xml
new file mode 100644
index 00000000..8949f406
--- /dev/null
+++ b/tests/phpunit/data/import/ImportLinkCacheIntegrationTest.xml
@@ -0,0 +1,43 @@
+<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.6/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.6/ http://www.mediawiki.org/xml/export-0.6.xsd" version="0.6" xml:lang="en-gb">
+ <siteinfo>
+ <sitename>MW-19</sitename>
+ <base>http://localhost:8080/w/index.php/Main_Page</base>
+ <generator>MediaWiki 1.19.7</generator>
+ <case>first-letter</case>
+ </siteinfo>
+ <page>
+ <title>Lorem ipsum</title>
+ <ns>0</ns>
+ <id>493</id>
+ <sha1>94lztkh4kgb0mvjr87iyjfq4iv7ltlh</sha1>
+ <revision>
+ <id>1358</id>
+ <timestamp>2014-04-04T22:55:04Z</timestamp>
+ <contributor>
+ <username>Tester</username>
+ <id>1</id>
+ </contributor>
+ <text xml:space="preserve" bytes="979">[[Has text::Lorem ipsum dolor sit amet consectetuer Maecenas adipiscing Pellentesque id sem]]. [[Has page::Elit Aliquam urna interdum]] morbi faucibus id tellus ipsum semper wisi. [[Has page::Platea enim hendrerit]] pellentesque consectetuer scelerisque Sed est felis felis quis. Auctor Proin In dolor id et ipsum vel at vitae ut. Praesent elit convallis Praesent aliquet pellentesque vel dolor pellentesque lacinia vitae. At tortor lacus Sed In interdum pulvinar et.
+
+[[Has number::1001]] [[Has quantity::10.25 km²]] [[Has date::1 Jan 2014]] [[Has Url::http://loremipsum.org/]] [[Has annotation uri::http://loremipsum.org/foaf.rdf]] [[Has email::Lorem@ipsum.org]] [[Has temperature::100 °C]] [[Has boolean::true]]
+
+[[Category:Lorem ipsum]]</text>
+ </revision>
+ </page>
+ <page>
+ <title>Category:Lorem ipsum</title>
+ <ns>14</ns>
+ <id>496</id>
+ <sha1>sir97j6uzt9ev2uyhaz1aj4i3spogih</sha1>
+ <revision>
+ <id>1355</id>
+ <timestamp>2014-04-04T22:29:18Z</timestamp>
+ <contributor>
+ <username>Tester</username>
+ <id>1</id>
+ </contributor>
+ <text xml:space="preserve" bytes="17">[[Category:Main]]</text>
+ </revision>
+ </page>
+</mediawiki>
+
diff --git a/tests/phpunit/data/less/common/test.common.mixins.less b/tests/phpunit/data/less/common/test.common.mixins.less
index 2fbe9b79..40647291 100644
--- a/tests/phpunit/data/less/common/test.common.mixins.less
+++ b/tests/phpunit/data/less/common/test.common.mixins.less
@@ -1,5 +1,4 @@
.test-mixin (@value) {
color: @value;
border: @foo solid @Foo;
- line-height: test-sum(@bar, 10, 20);
}
diff --git a/tests/phpunit/data/less/module/styles.css b/tests/phpunit/data/less/module/styles.css
index b78780a9..bac695b9 100644
--- a/tests/phpunit/data/less/module/styles.css
+++ b/tests/phpunit/data/less/module/styles.css
@@ -1,6 +1,5 @@
/* @noflip */
.unit-tests {
- color: green;
+ color: #008000;
border: 2px solid #eeeeee;
- line-height: 35;
}
diff --git a/tests/phpunit/data/media/2_webp_a.webp b/tests/phpunit/data/media/2_webp_a.webp
new file mode 100644
index 00000000..8764f066
--- /dev/null
+++ b/tests/phpunit/data/media/2_webp_a.webp
Binary files differ
diff --git a/tests/phpunit/data/media/2_webp_ll.webp b/tests/phpunit/data/media/2_webp_ll.webp
new file mode 100644
index 00000000..5794bbf2
--- /dev/null
+++ b/tests/phpunit/data/media/2_webp_ll.webp
Binary files differ
diff --git a/tests/phpunit/data/media/srgb.jpg b/tests/phpunit/data/media/srgb.jpg
new file mode 100644
index 00000000..b965dc4f
--- /dev/null
+++ b/tests/phpunit/data/media/srgb.jpg
Binary files differ
diff --git a/tests/phpunit/data/media/tinyrgb.icc b/tests/phpunit/data/media/tinyrgb.icc
new file mode 100644
index 00000000..eab973f5
--- /dev/null
+++ b/tests/phpunit/data/media/tinyrgb.icc
Binary files differ
diff --git a/tests/phpunit/data/media/tinyrgb.jpg b/tests/phpunit/data/media/tinyrgb.jpg
new file mode 100644
index 00000000..12a8e09f
--- /dev/null
+++ b/tests/phpunit/data/media/tinyrgb.jpg
Binary files differ
diff --git a/tests/phpunit/data/media/webp_animated.webp b/tests/phpunit/data/media/webp_animated.webp
new file mode 100644
index 00000000..25c6a4dd
--- /dev/null
+++ b/tests/phpunit/data/media/webp_animated.webp
Binary files differ
diff --git a/tests/phpunit/data/templates/bad_partial.mustache b/tests/phpunit/data/templates/bad_partial.mustache
new file mode 100644
index 00000000..d2767f0f
--- /dev/null
+++ b/tests/phpunit/data/templates/bad_partial.mustache
@@ -0,0 +1 @@
+Partial {{>nonexistenttemplate}} in here
diff --git a/tests/phpunit/data/templates/has_partial.mustache b/tests/phpunit/data/templates/has_partial.mustache
new file mode 100644
index 00000000..504387a4
--- /dev/null
+++ b/tests/phpunit/data/templates/has_partial.mustache
@@ -0,0 +1 @@
+Partial {{>foobar_args}} in here