mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 21:54:28 +00:00
Build/Test tools: Correctly delete attachment files used in the media and post thumbnail tests.
Props atanasangelovdev Fixes #38264 git-svn-id: https://develop.svn.wordpress.org/trunk@41693 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -20,6 +20,11 @@ class Tests_Media extends WP_UnitTestCase {
|
||||
$GLOBALS['_wp_additional_image_sizes'] = self::$_sizes;
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass() {
|
||||
wp_delete_post( self::$large_id, true );
|
||||
parent::tearDownAfterClass();
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
$this->caption = 'A simple caption.';
|
||||
|
||||
@@ -22,6 +22,11 @@ class Tests_Post_Thumbnail_Template extends WP_UnitTestCase {
|
||||
) );
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass() {
|
||||
wp_delete_post( self::$attachment_id, true );
|
||||
parent::tearDownAfterClass();
|
||||
}
|
||||
|
||||
function test_has_post_thumbnail() {
|
||||
$this->assertFalse( has_post_thumbnail( self::$post ) );
|
||||
$this->assertFalse( has_post_thumbnail( self::$post->ID ) );
|
||||
|
||||
Reference in New Issue
Block a user