You appear to be a bot. Output may be restricted
Description
Usage
Tests_Media::test_attachment_url_to_postid();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/media.php
Lines:
1 to 15 of 15
function test_attachment_url_to_postid() { $image_path = '2014/11/' . $this->img_name; $attachment_id = self::factory()->attachment->create_object( $image_path, 0, array( 'post_mime_type' => 'image/jpeg', 'post_type' => 'attachment', ) ); $image_url = 'http://' . WP_TESTS_DOMAIN . '/wp-content/uploads/' . $image_path; $this->assertEquals( $attachment_id, attachment_url_to_postid( $image_url ) ); }