Copy various random files used by tests to tests/phpunit/data
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 26 May 2014 09:55:07 +0000 (11:55 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 3 Jun 2014 20:52:51 +0000 (22:52 +0200)
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

tests/parser/parserTest.inc
tests/phpunit/data/filerepo/video.png [new file with mode: 0644]
tests/phpunit/data/filerepo/wiki.png [new file with mode: 0644]
tests/phpunit/data/parser/LoremIpsum.djvu [new file with mode: 0644]
tests/phpunit/data/parser/headbg.jpg [new file with mode: 0644]
tests/phpunit/data/parser/wiki.png [new file with mode: 0644]
tests/phpunit/data/upload/headbg.jpg [new file with mode: 0644]
tests/phpunit/includes/filerepo/StoreBatchTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php

index 1875ac5..c886011 100644 (file)
@@ -1134,18 +1134,18 @@ class ParserTest {
                }
 
                wfMkdirParents( $dir . '/3/3a', null, __METHOD__ );
-               copy( "$IP/skins/monobook/headbg.jpg", "$dir/3/3a/Foobar.jpg" );
+               copy( "$IP/tests/phpunit/data/parser/headbg.jpg", "$dir/3/3a/Foobar.jpg" );
                wfMkdirParents( $dir . '/e/ea', null, __METHOD__ );
-               copy( "$IP/skins/monobook/wiki.png", "$dir/e/ea/Thumb.png" );
+               copy( "$IP/tests/phpunit/data/parser/wiki.png", "$dir/e/ea/Thumb.png" );
                wfMkdirParents( $dir . '/0/09', null, __METHOD__ );
-               copy( "$IP/skins/monobook/headbg.jpg", "$dir/0/09/Bad.jpg" );
+               copy( "$IP/tests/phpunit/data/parser/headbg.jpg", "$dir/0/09/Bad.jpg" );
                wfMkdirParents( $dir . '/f/ff', null, __METHOD__ );
                file_put_contents( "$dir/f/ff/Foobar.svg",
                        '<?xml version="1.0" encoding="utf-8"?>' .
                        '<svg xmlns="http://www.w3.org/2000/svg"' .
                        ' version="1.1" width="240" height="180"/>' );
                wfMkdirParents( $dir . '/5/5f', null, __METHOD__ );
-               copy( "$IP/tests/phpunit/data/media/LoremIpsum.djvu", "$dir/5/5f/LoremIpsum.djvu" );
+               copy( "$IP/tests/phpunit/data/parser/LoremIpsum.djvu", "$dir/5/5f/LoremIpsum.djvu" );
 
                return $dir;
        }
diff --git a/tests/phpunit/data/filerepo/video.png b/tests/phpunit/data/filerepo/video.png
new file mode 100644 (file)
index 0000000..d86dbe0
Binary files /dev/null and b/tests/phpunit/data/filerepo/video.png differ
diff --git a/tests/phpunit/data/filerepo/wiki.png b/tests/phpunit/data/filerepo/wiki.png
new file mode 100644 (file)
index 0000000..8c42118
Binary files /dev/null and b/tests/phpunit/data/filerepo/wiki.png differ
diff --git a/tests/phpunit/data/parser/LoremIpsum.djvu b/tests/phpunit/data/parser/LoremIpsum.djvu
new file mode 100644 (file)
index 0000000..42f47cd
Binary files /dev/null and b/tests/phpunit/data/parser/LoremIpsum.djvu differ
diff --git a/tests/phpunit/data/parser/headbg.jpg b/tests/phpunit/data/parser/headbg.jpg
new file mode 100644 (file)
index 0000000..5491c6e
Binary files /dev/null and b/tests/phpunit/data/parser/headbg.jpg differ
diff --git a/tests/phpunit/data/parser/wiki.png b/tests/phpunit/data/parser/wiki.png
new file mode 100644 (file)
index 0000000..8c42118
Binary files /dev/null and b/tests/phpunit/data/parser/wiki.png differ
diff --git a/tests/phpunit/data/upload/headbg.jpg b/tests/phpunit/data/upload/headbg.jpg
new file mode 100644 (file)
index 0000000..5491c6e
Binary files /dev/null and b/tests/phpunit/data/upload/headbg.jpg differ
index 3276cf9..a79866e 100644 (file)
@@ -132,14 +132,14 @@ class StoreBatchTest extends MediaWikiTestCase {
                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
                );
        }
index 14bcac0..e82439a 100644 (file)
@@ -489,19 +489,19 @@ class NewParserTest extends MediaWikiTestCase {
                $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/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
index 4bc29cd..b27337b 100644 (file)
@@ -188,10 +188,10 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                }
 
                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;
        }