jenkins-bot has submitted this change and it was merged.

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
---
M tests/parser/parserTest.inc
A tests/phpunit/data/filerepo/video.png
A tests/phpunit/data/filerepo/wiki.png
A tests/phpunit/data/parser/LoremIpsum.djvu
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, 14 insertions(+), 14 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index 1875ac5..c886011 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -1134,18 +1134,18 @@
                }
 
                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
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/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 14bcac0..e82439a 100644
--- a/tests/phpunit/includes/parser/NewParserTest.php
+++ b/tests/phpunit/includes/parser/NewParserTest.php
@@ -489,19 +489,19 @@
                $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 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: merged
Gerrit-Change-Id: Id2440326981218f9e7d51541a168db59183fdadf
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Tpt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to