From: Bartosz DziewoƄski Date: Mon, 26 May 2014 09:55:07 +0000 (+0200) Subject: Copy various random files used by tests to tests/phpunit/data X-Git-Tag: 1.31.0-rc.0~15488^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=fd718959b6cae8473291e2c21e842d2563bf8c4e;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 1875ac5cca..c886011214 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -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", '' . '' ); 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 index 0000000000..d86dbe01c2 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 index 0000000000..8c42118385 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 index 0000000000..42f47cd08f 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 index 0000000000..5491c6e4ac 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 index 0000000000..8c42118385 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 index 0000000000..5491c6e4ac Binary files /dev/null and b/tests/phpunit/data/upload/headbg.jpg differ diff --git a/tests/phpunit/includes/filerepo/StoreBatchTest.php b/tests/phpunit/includes/filerepo/StoreBatchTest.php index 3276cf98d4..a79866efcb 100644 --- a/tests/phpunit/includes/filerepo/StoreBatchTest.php +++ b/tests/phpunit/includes/filerepo/StoreBatchTest.php @@ -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 ); } diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 14bcac097a..e82439a424 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -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 diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php b/tests/phpunit/suites/UploadFromUrlTestSuite.php index 4bc29cd294..b27337b21b 100644 --- a/tests/phpunit/suites/UploadFromUrlTestSuite.php +++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php @@ -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; }