diff --git a/tests/phpunit/tests/post.php b/tests/phpunit/tests/post.php index 39a8bae14a..c1657ca271 100644 --- a/tests/phpunit/tests/post.php +++ b/tests/phpunit/tests/post.php @@ -559,46 +559,6 @@ class Tests_Post extends WP_UnitTestCase { $this->assertEquals( get_option( 'siteurl' ) . '/2007/10/31/' . $id . '/', $plink ); } - /** - * @ticket 15665 - */ - function test_get_page_by_path_priority() { - global $wpdb; - - $attachment = self::factory()->post->create_and_get( - array( - 'post_title' => 'some-page', - 'post_type' => 'attachment', - ) - ); - $page = self::factory()->post->create_and_get( - array( - 'post_title' => 'some-page', - 'post_type' => 'page', - ) - ); - $other_att = self::factory()->post->create_and_get( - array( - 'post_title' => 'some-other-page', - 'post_type' => 'attachment', - ) - ); - - $wpdb->update( $wpdb->posts, array( 'post_name' => 'some-page' ), array( 'ID' => $page->ID ) ); - clean_post_cache( $page->ID ); - - $page = get_post( $page->ID ); - - $this->assertEquals( 'some-page', $attachment->post_name ); - $this->assertEquals( 'some-page', $page->post_name ); - - // get_page_by_path() should return a post of the requested type before returning an attachment. - $this->assertEquals( $page, get_page_by_path( 'some-page' ) ); - - // Make sure get_page_by_path() will still select an attachment when a post of the requested type doesn't exist. - $this->assertEquals( $other_att, get_page_by_path( 'some-other-page' ) ); - } - function test_wp_publish_post() { $draft_id = self::factory()->post->create( array( 'post_status' => 'draft' ) );