Make WordPress Core


Ignore:
Timestamp:
07/12/2014 07:08:15 AM (9 years ago)
Author:
wonderboymusic
Message:

Wouldn't it be incredible if you could run Unit Tests without all of your uploads being indiscriminately blown away and your upload folder permissions being destroyed?

The Future Is Now.

Fixes #28847.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/upload.php

    r26552 r29120  
    2323
    2424    function tearDown() {
     25        $this->remove_added_uploads();
     26
    2527        parent::tearDown();
    26 
    27         // Remove year/month folders created by wp_upload_dir().
    28         $uploads = wp_upload_dir();
    29         foreach ( scandir( $uploads['basedir'] ) as $file )
    30             _rmdir( $uploads['basedir'] . '/' . $file );
    31         _rmdir( ABSPATH . 'foo/' );
    3228    }
    3329
Note: See TracChangeset for help on using the changeset viewer.