Make WordPress Core

Ticket #42736: 42736.diff

File 42736.diff, 998 bytes (added by birgire, 7 years ago)
  • tests/phpunit/tests/media.php

    diff --git tests/phpunit/tests/media.php tests/phpunit/tests/media.php
    index 20b670f..7f0a8a5 100644
    EOF; 
    22782278
    22792279                $url = wp_get_attachment_url( $post_id );
    22802280
     2281                $uploads_dir = wp_upload_dir( '2010/01' );
     2282
     2283                $expected = $uploads_dir['url'] . '/test-image-iptc.jpg';
     2284
    22812285                // Clean up.
    22822286                wp_delete_attachment( $post_id );
    22832287                wp_delete_post( $parent_id );
    22842288
    2285                 $this->assertSame( 'http://example.org/wp-content/uploads/2010/01/test-image-iptc.jpg', $url );
     2289                $this->assertSame( $expected, $url );
    22862290        }
    22872291
    22882292        /**
    EOF; 
    23152319
    23162320                $uploads_dir = wp_upload_dir( current_time( 'mysql' ) );
    23172321
    2318                 $expected = $uploads_dir['url'] . 'test-image-iptc.jpg';
     2322                $expected = $uploads_dir['url'] . '/test-image-iptc.jpg';
    23192323
    23202324                // Clean up.
    23212325                wp_delete_attachment( $post_id );
    23222326                wp_delete_post( $parent_id );
    23232327
    2324                 $this->assertNotEquals( $expected, $url );
     2328                $this->assertSame( $expected, $url );
    23252329        }
    23262330}
    23272331