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

Change subject: Remove redundant test teardown in UploadFromUrlTestSuite
......................................................................


Remove redundant test teardown in UploadFromUrlTestSuite

Looks like this was copied from the Parser upload test suite
but never used.

Change-Id: I41dd384d0cf996fdf459bc544d1430fc46d41025
---
M tests/phpunit/suites/UploadFromUrlTestSuite.php
1 file changed, 1 insertion(+), 55 deletions(-)

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



diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php 
b/tests/phpunit/suites/UploadFromUrlTestSuite.php
index 80893da..5e70455 100644
--- a/tests/phpunit/suites/UploadFromUrlTestSuite.php
+++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php
@@ -86,53 +86,7 @@
                RepoGroup::destroySingleton();
                FileBackendGroup::destroySingleton();
 
-               $this->teardownUploadDir( $this->uploadDir );
-
                parent::tearDown();
-       }
-
-       private $uploadDir;
-       private $keepUploads;
-
-       /**
-        * Remove the dummy uploads directory
-        * @param string $dir
-        */
-       private function teardownUploadDir( $dir ) {
-               if ( $this->keepUploads ) {
-                       return;
-               }
-
-               // delete the files first, then the dirs.
-               self::deleteFiles(
-                       array(
-                               "$dir/3/3a/Foobar.jpg",
-                               "$dir/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg",
-                               "$dir/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg",
-                               "$dir/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg",
-                               "$dir/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg",
-
-                               "$dir/0/09/Bad.jpg",
-                       )
-               );
-
-               self::deleteDirs(
-                       array(
-                               "$dir/3/3a",
-                               "$dir/3",
-                               "$dir/thumb/6/65",
-                               "$dir/thumb/6",
-                               "$dir/thumb/3/3a/Foobar.jpg",
-                               "$dir/thumb/3/3a",
-                               "$dir/thumb/3",
-
-                               "$dir/0/09/",
-                               "$dir/0/",
-
-                               "$dir/thumb",
-                               "$dir",
-                       )
-               );
        }
 
        /**
@@ -170,15 +124,7 @@
        private function setupUploadDir() {
                global $IP;
 
-               if ( $this->keepUploads ) {
-                       $dir = wfTempDir() . '/mwParser-images';
-
-                       if ( is_dir( $dir ) ) {
-                               return $dir;
-                       }
-               } else {
-                       $dir = $this->getNewTempDirectory();
-               }
+               $dir = $this->getNewTempDirectory();
 
                wfDebug( "Creating upload directory $dir\n" );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41dd384d0cf996fdf459bc544d1430fc46d41025
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to