Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/135408

Change subject: Copy various random files used by tests to tests/phpunit/data
......................................................................

Copy various random files used by tests to tests/phpunit/data

The tests currently depend on them never being renamed, which is bad.
(Actual file data in git is de-duplicated automatically AFAIK.)

Change-Id: Id2440326981218f9e7d51541a168db59183fdadf
---
A tests/phpunit/data/filerepo/video.png
A tests/phpunit/data/filerepo/wiki.png
A tests/phpunit/data/parser/LoremIpsum.djvu
R tests/phpunit/data/parser/Portrait.png
A tests/phpunit/data/parser/headbg.jpg
A tests/phpunit/data/parser/wiki.png
A tests/phpunit/data/upload/headbg.jpg
M tests/phpunit/includes/filerepo/StoreBatchTest.php
M tests/phpunit/includes/parser/NewParserTest.php
M tests/phpunit/suites/UploadFromUrlTestSuite.php
10 files changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/135408/1

diff --git a/tests/phpunit/data/filerepo/video.png 
b/tests/phpunit/data/filerepo/video.png
new file mode 100644
index 0000000..d86dbe0
--- /dev/null
+++ b/tests/phpunit/data/filerepo/video.png
Binary files differ
diff --git a/tests/phpunit/data/filerepo/wiki.png 
b/tests/phpunit/data/filerepo/wiki.png
new file mode 100644
index 0000000..8c42118
--- /dev/null
+++ b/tests/phpunit/data/filerepo/wiki.png
Binary files differ
diff --git a/tests/phpunit/data/parser/LoremIpsum.djvu 
b/tests/phpunit/data/parser/LoremIpsum.djvu
new file mode 100644
index 0000000..42f47cd
--- /dev/null
+++ b/tests/phpunit/data/parser/LoremIpsum.djvu
Binary files differ
diff --git a/tests/phpunit/data/media/Portrait.png 
b/tests/phpunit/data/parser/Portrait.png
similarity index 100%
rename from tests/phpunit/data/media/Portrait.png
rename to tests/phpunit/data/parser/Portrait.png
Binary files differ
diff --git a/tests/phpunit/data/parser/headbg.jpg 
b/tests/phpunit/data/parser/headbg.jpg
new file mode 100644
index 0000000..5491c6e
--- /dev/null
+++ b/tests/phpunit/data/parser/headbg.jpg
Binary files differ
diff --git a/tests/phpunit/data/parser/wiki.png 
b/tests/phpunit/data/parser/wiki.png
new file mode 100644
index 0000000..8c42118
--- /dev/null
+++ b/tests/phpunit/data/parser/wiki.png
Binary files differ
diff --git a/tests/phpunit/data/upload/headbg.jpg 
b/tests/phpunit/data/upload/headbg.jpg
new file mode 100644
index 0000000..5491c6e
--- /dev/null
+++ b/tests/phpunit/data/upload/headbg.jpg
Binary files differ
diff --git a/tests/phpunit/includes/filerepo/StoreBatchTest.php 
b/tests/phpunit/includes/filerepo/StoreBatchTest.php
index 3276cf9..a79866e 100644
--- a/tests/phpunit/includes/filerepo/StoreBatchTest.php
+++ b/tests/phpunit/includes/filerepo/StoreBatchTest.php
@@ -132,14 +132,14 @@
                global $IP;
                $this->storecohort(
                        "Test1.png",
-                       "$IP/skins/monobook/wiki.png",
-                       "$IP/skins/monobook/video.png",
+                       "$IP/tests/phpunit/data/filerepo/wiki.png",
+                       "$IP/tests/phpunit/data/filerepo/video.png",
                        false
                );
                $this->storecohort(
                        "Test2.png",
-                       "$IP/skins/monobook/wiki.png",
-                       "$IP/skins/monobook/video.png",
+                       "$IP/tests/phpunit/data/filerepo/wiki.png",
+                       "$IP/tests/phpunit/data/filerepo/video.png",
                        true
                );
        }
diff --git a/tests/phpunit/includes/parser/NewParserTest.php 
b/tests/phpunit/includes/parser/NewParserTest.php
index 26efa4a..1b1ed4a 100644
--- a/tests/phpunit/includes/parser/NewParserTest.php
+++ b/tests/phpunit/includes/parser/NewParserTest.php
@@ -517,23 +517,23 @@
                $backend = RepoGroup::singleton()->getLocalRepo()->getBackend();
                $backend->prepare( array( 'dir' => "$base/local-public/3/3a" ) 
);
                $backend->store( array(
-                       'src' => "$IP/skins/monobook/headbg.jpg", 'dst' => 
"$base/local-public/3/3a/Foobar.jpg"
+                       'src' => "$IP/tests/phpunit/data/parser/headbg.jpg", 
'dst' => "$base/local-public/3/3a/Foobar.jpg"
                ) );
                $backend->prepare( array( 'dir' => "$base/local-public/e/ea" ) 
);
                $backend->store( array(
-                       'src' => "$IP/skins/monobook/wiki.png", 'dst' => 
"$base/local-public/e/ea/Thumb.png"
+                       'src' => "$IP/tests/phpunit/data/parser/wiki.png", 
'dst' => "$base/local-public/e/ea/Thumb.png"
                ) );
                $backend->prepare( array( 'dir' => "$base/local-public/0/09" ) 
);
                $backend->store( array(
-                       'src' => "$IP/skins/monobook/headbg.jpg", 'dst' => 
"$base/local-public/0/09/Bad.jpg"
+                       'src' => "$IP/tests/phpunit/data/parser/headbg.jpg", 
'dst' => "$base/local-public/0/09/Bad.jpg"
                ) );
                $backend->prepare( array( 'dir' => "$base/local-public/9/93" ) 
);
                $backend->store( array(
-                       'src' => "$IP/tests/phpunit/data/media/Portrait.png", 
'dst' => "$base/local-public/9/93/Portrait.png"
+                       'src' => "$IP/tests/phpunit/data/parser/Portrait.png", 
'dst' => "$base/local-public/9/93/Portrait.png"
                ) );
                $backend->prepare( array( 'dir' => "$base/local-public/5/5f" ) 
);
                $backend->store( array(
-                       'src' => 
"$IP/tests/phpunit/data/media/LoremIpsum.djvu", 'dst' => 
"$base/local-public/5/5f/LoremIpsum.djvu"
+                       'src' => 
"$IP/tests/phpunit/data/parser/LoremIpsum.djvu", 'dst' => 
"$base/local-public/5/5f/LoremIpsum.djvu"
                ) );
 
                // No helpful SVG file to copy, so make one ourselves
diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php 
b/tests/phpunit/suites/UploadFromUrlTestSuite.php
index 4bc29cd..b27337b 100644
--- a/tests/phpunit/suites/UploadFromUrlTestSuite.php
+++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php
@@ -188,10 +188,10 @@
                }
 
                wfMkdirParents( $dir . '/3/3a', null, __METHOD__ );
-               copy( "$IP/skins/monobook/headbg.jpg", "$dir/3/3a/Foobar.jpg" );
+               copy( "$IP/tests/phpunit/data/upload/headbg.jpg", 
"$dir/3/3a/Foobar.jpg" );
 
                wfMkdirParents( $dir . '/0/09', null, __METHOD__ );
-               copy( "$IP/skins/monobook/headbg.jpg", "$dir/0/09/Bad.jpg" );
+               copy( "$IP/tests/phpunit/data/upload/headbg.jpg", 
"$dir/0/09/Bad.jpg" );
 
                return $dir;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/135408
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2440326981218f9e7d51541a168db59183fdadf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to