Make WordPress Core


Ignore:
Timestamp:
10/21/2016 11:02:37 AM (8 years ago)
Author:
pento
Message:

Tests: Use a minimal theme for tests.

New default themes require workarounds being added to several unit tests, as they often alter default WordPress behaviour. To avoid ongoing maintenance issues, this change switches to a minimal theme when running tests.

This change also removes the old workarounds for default themes.

Fixes #31550.

File:
1 edited

Legend:

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

    r38838 r38858  
    3434        $this->img_html = '<img src="' . $this->img_url . '"/>';
    3535        $this->img_meta = array( 'width' => 100, 'height' => 100, 'sizes' => '' );
    36 
    37         // Disable Twenty Seventeen changes to the image size attribute
    38         remove_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr' );
    39         remove_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr' );
    40     }
    41 
    42     function tearDown() {
    43         parent::tearDown();
    44 
    45         // Reset Twenty Seventeen behaviour
    46         add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr', 10, 2 );
    47         add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 );
    4836    }
    4937
Note: See TracChangeset for help on using the changeset viewer.