Make WordPress Core


Ignore:
Timestamp:
02/25/2018 06:42:26 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Tests: Avoid hardcoded domain name in test_media_handle_upload_uses_post_parent_for_directory_date().

Props birgire.
See #42736.

File:
1 edited

Legend:

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

    r42694 r42742  
    23872387        $url = wp_get_attachment_url( $post_id );
    23882388
     2389        $uploads_dir = wp_upload_dir( '2010/01' );
     2390
     2391        $expected = $uploads_dir['url'] . '/test-image-iptc.jpg';
     2392
    23892393        // Clean up.
    23902394        wp_delete_attachment( $post_id );
    23912395        wp_delete_post( $parent_id );
    23922396
    2393         $this->assertSame( 'http://example.org/wp-content/uploads/2010/01/test-image-iptc.jpg', $url );
     2397        $this->assertSame( $expected, $url );
    23942398    }
    23952399
Note: See TracChangeset for help on using the changeset viewer.