WordPress.org

Make WordPress Core

Changeset 38383


Ignore:
Timestamp:
08/26/2016 08:50:24 PM (3 years ago)
Author:
wonderboymusic
Message:

Unit Tests: after r38303, replace usage of global $_wp_additional_image_sizes with wp_get_additional_image_sizes().

See #37699.

File:
1 edited

Legend:

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

    r38302 r38383  
    1010
    1111    public static function wpSetUpBeforeClass( $factory ) {
    12         self::$_sizes = $GLOBALS['_wp_additional_image_sizes'];
     12        self::$_sizes = wp_get_additional_image_sizes();
    1313        $GLOBALS['_wp_additional_image_sizes'] = array();
    1414
     
    651651     */
    652652    function test_add_image_size() {
    653         global $_wp_additional_image_sizes;
    654 
    655         if ( ! isset( $_wp_additional_image_sizes ) ) {
    656             $_wp_additional_image_sizes = array();
    657         }
     653        $_wp_additional_image_sizes = wp_get_additional_image_sizes();
    658654
    659655        remove_image_size( 'test-size' );
     
    662658        add_image_size( 'test-size', 200, 600 );
    663659
    664         $sizes = $_wp_additional_image_sizes;
     660        $sizes = wp_get_additional_image_sizes();
    665661
    666662        // Clean up
     
    978974     */
    979975    function test_wp_calculate_image_srcset() {
    980         global $_wp_additional_image_sizes;
     976        $_wp_additional_image_sizes = wp_get_additional_image_sizes();
    981977
    982978        $year_month = date('Y/m');
     
    10181014     */
    10191015    function test_wp_calculate_image_srcset_no_date_uploads() {
    1020         global $_wp_additional_image_sizes;
     1016        $_wp_additional_image_sizes = wp_get_additional_image_sizes();
    10211017
    10221018        // Disable date organized uploads
     
    11001096     */
    11011097    function test_wp_calculate_image_srcset_with_absolute_path_in_meta() {
    1102         global $_wp_additional_image_sizes;
     1098        $_wp_additional_image_sizes = wp_get_additional_image_sizes();
    11031099
    11041100        $year_month = date('Y/m');
     
    13761372     */
    13771373    function test_wp_get_attachment_image_srcset() {
    1378         global $_wp_additional_image_sizes;
     1374        $_wp_additional_image_sizes = wp_get_additional_image_sizes();
    13791375
    13801376        $image_meta = wp_get_attachment_metadata( self::$large_id );
Note: See TracChangeset for help on using the changeset viewer.