Tests: Avoid hardcoded domain name in `test_media_handle_upload_uses_post_parent_for_directory_date()`.

Props birgire.
See #42736.

git-svn-id: https://develop.svn.wordpress.org/trunk@42742 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-02-25 18:42:26 +00:00
parent d8a4215abb
commit 557103ede6
1 changed files with 5 additions and 1 deletions

View File

@ -2386,11 +2386,15 @@ EOF;
$url = wp_get_attachment_url( $post_id );
$uploads_dir = wp_upload_dir( '2010/01' );
$expected = $uploads_dir['url'] . '/test-image-iptc.jpg';
// Clean up.
wp_delete_attachment( $post_id );
wp_delete_post( $parent_id );
$this->assertSame( 'http://example.org/wp-content/uploads/2010/01/test-image-iptc.jpg', $url );
$this->assertSame( $expected, $url );
}
/**