Make WordPress Core

Changeset 41693


Ignore:
Timestamp:
10/03/2017 12:08:16 AM (7 years ago)
Author:
johnbillion
Message:

Build/Test tools: Correctly delete attachment files used in the media and post thumbnail tests.

Props atanasangelovdev

Fixes #38264

Location:
trunk/tests/phpunit/tests
Files:
2 edited

Legend:

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

    r41229 r41693  
    1919    public static function wpTearDownAfterClass() {
    2020        $GLOBALS['_wp_additional_image_sizes'] = self::$_sizes;
     21    }
     22
     23    public static function tearDownAfterClass() {
     24        wp_delete_post( self::$large_id, true );
     25        parent::tearDownAfterClass();
    2126    }
    2227
  • trunk/tests/phpunit/tests/post/thumbnails.php

    r41267 r41693  
    2121            'post_mime_type' => 'image/jpeg',
    2222        ) );
     23    }
     24
     25    public static function tearDownAfterClass() {
     26        wp_delete_post( self::$attachment_id, true );
     27        parent::tearDownAfterClass();
    2328    }
    2429
Note: See TracChangeset for help on using the changeset viewer.