Make WordPress Core

Ticket #41216: 41216.1.diff

File 41216.1.diff, 1.6 KB (added by danielbachhuber, 8 years ago)
  • tests/phpunit/tests/image/header.php

    diff --git a/tests/phpunit/tests/image/header.php b/tests/phpunit/tests/image/header.php
    index cfa21fcb6e..07cc4edae9 100644
    a b class Tests_Image_Header extends WP_UnitTestCase { 
    108108                        'post_status' => 'publish',
    109109                        'post_title' => 'foo.png',
    110110                        'post_type' => 'post',
    111                         'guid' => 'http://localhost/foo.png'
     111                        'guid' => 'foo.png'
    112112                ) );
    113113
    114                 $cropped = 'http://localhost/foo-cropped.png';
     114                $cropped = 'foo-cropped.png';
    115115
    116116                $object = $this->custom_image_header->create_attachment_object( $cropped, $id );
    117                 $this->assertEquals( $object['post_title'], 'foo-cropped.png' );
    118                 $this->assertEquals( $object['guid'], $cropped );
    119                 $this->assertEquals( $object['context'], 'custom-header' );
    120                 $this->assertEquals( $object['post_mime_type'], 'image/jpeg' );
     117                $this->assertEquals( 'foo-cropped.png', $object['post_title'] );
     118                $this->assertEquals( 'http://' . $cropped, $object['guid'] );
     119                $this->assertEquals( 'custom-header', $object['context'] );
     120                $this->assertEquals( 'image/jpeg', $object['post_mime_type'] );
    121121        }
    122122
    123123        function test_insert_cropped_attachment() {
    class Tests_Image_Header extends WP_UnitTestCase { 
    125125                        'post_status' => 'publish',
    126126                        'post_title' => 'foo.png',
    127127                        'post_type' => 'post',
    128                         'guid' => 'http://localhost/foo.png'
     128                        'guid' => 'foo.png'
    129129                ) );
    130130
    131                 $cropped = 'http://localhost/foo-cropped.png';
     131                $cropped = 'foo-cropped.png';
    132132                $object = $this->custom_image_header->create_attachment_object( $cropped, $id );
    133133
    134134                $cropped_id = $this->custom_image_header->insert_attachment( $object, $cropped );