Make WordPress Core


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

    r26088 r29120  
    3333        public function tearDown() {
    3434                // Cleanup
    35                 foreach ($this->_ids as $id){
    36                         wp_delete_attachment($id, true);
     35                foreach ( $this->_ids as $id ) {
     36                        wp_delete_attachment( $id, true );
    3737                }
    38 
    39                 $uploads = wp_upload_dir();
    40                 foreach ( scandir( $uploads['basedir'] ) as $file )
    41                         _rmdir( $uploads['basedir'] . '/' . $file );
    4238
    4339                parent::tearDown();
Note: See TracChangeset for help on using the changeset viewer.