WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/12/2014 07:08:15 AM (7 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/post/attachments.php

    r28788 r29120  
    1010    function tearDown() {
    1111        // Remove all uploads.
    12         $uploads = wp_upload_dir();
    13         foreach ( scandir( $uploads['basedir'] ) as $file )
    14             _rmdir( $uploads['basedir'] . '/' . $file );
    15 
     12        $this->remove_added_uploads();
    1613        parent::tearDown();
    1714    }
Note: See TracChangeset for help on using the changeset viewer.