diff --git tests/phpunit/tests/media.php tests/phpunit/tests/media.php
index 20b670f..7f0a8a5 100644
|
|
EOF; |
2278 | 2278 | |
2279 | 2279 | $url = wp_get_attachment_url( $post_id ); |
2280 | 2280 | |
| 2281 | $uploads_dir = wp_upload_dir( '2010/01' ); |
| 2282 | |
| 2283 | $expected = $uploads_dir['url'] . '/test-image-iptc.jpg'; |
| 2284 | |
2281 | 2285 | // Clean up. |
2282 | 2286 | wp_delete_attachment( $post_id ); |
2283 | 2287 | wp_delete_post( $parent_id ); |
2284 | 2288 | |
2285 | | $this->assertSame( 'http://example.org/wp-content/uploads/2010/01/test-image-iptc.jpg', $url ); |
| 2289 | $this->assertSame( $expected, $url ); |
2286 | 2290 | } |
2287 | 2291 | |
2288 | 2292 | /** |
… |
… |
EOF; |
2315 | 2319 | |
2316 | 2320 | $uploads_dir = wp_upload_dir( current_time( 'mysql' ) ); |
2317 | 2321 | |
2318 | | $expected = $uploads_dir['url'] . 'test-image-iptc.jpg'; |
| 2322 | $expected = $uploads_dir['url'] . '/test-image-iptc.jpg'; |
2319 | 2323 | |
2320 | 2324 | // Clean up. |
2321 | 2325 | wp_delete_attachment( $post_id ); |
2322 | 2326 | wp_delete_post( $parent_id ); |
2323 | 2327 | |
2324 | | $this->assertNotEquals( $expected, $url ); |
| 2328 | $this->assertSame( $expected, $url ); |
2325 | 2329 | } |
2326 | 2330 | } |
2327 | 2331 | |