Make WordPress Core

Ticket #40008: 40008.diff

File 40008.diff, 1.7 KB (added by bor0, 9 years ago)
  • tests/phpunit/tests/customize/manager.php

     
    5858                require_once( ABSPATH . WPINC . '/class-wp-customize-manager.php' );
    5959                $this->manager = $this->instantiate();
    6060                $this->undefined = new stdClass();
     61
     62                $orig_file = DIR_TESTDATA . '/images/canola.jpg';
     63                $this->test_file = '/tmp/canola.jpg';
     64                copy( $orig_file, $this->test_file );
     65                $orig_file2 = DIR_TESTDATA . '/images/waffles.jpg';
     66                $this->test_file2 = '/tmp/waffles.jpg';
     67                copy( $orig_file2, $this->test_file2 );
    6168        }
    6269
    6370        /**
     
    318325                add_theme_support( 'custom-header' );
    319326                add_theme_support( 'custom-background' );
    320327
    321                 $canola_file = DIR_TESTDATA . '/images/canola.jpg';
    322                 $existing_canola_attachment_id = self::factory()->attachment->create_object( $canola_file, 0, array(
     328                $existing_canola_attachment_id = self::factory()->attachment->create_object( $this->test_file, 0, array(
    323329                        'post_mime_type' => 'image/jpeg',
    324330                        'post_type' => 'attachment',
    325331                        'post_name' => 'canola',
     
    383389                                        'post_title' => 'Waffles',
    384390                                        'post_content' => 'Waffles Attachment Description',
    385391                                        'post_excerpt' => 'Waffles Attachment Caption',
    386                                         'file' => DIR_TESTDATA . '/images/waffles.jpg',
     392                                        'file' => $this->test_file2,
    387393                                ),
    388394                                'canola' => array(
    389395                                        'post_title' => 'Canola',
    390396                                        'post_content' => 'Canola Attachment Description',
    391397                                        'post_excerpt' => 'Canola Attachment Caption',
    392                                         'file' => DIR_TESTDATA . '/images/canola.jpg',
     398                                        'file' => $this->test_file,
    393399                                ),
    394400                        ),
    395401                        'options' => array(