From 0c673c230871454cc1f918c2be3ff5f5a1d83910 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 6 Dec 2019 17:25:32 +0000 Subject: [PATCH] Tests: Remove duplicate `test_get_page_by_path_priority()` test. The test was moved into its own file in [37478], but never removed from its previous location. See #36711. git-svn-id: https://develop.svn.wordpress.org/trunk@46819 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/post.php | 40 ------------------------------------ 1 file changed, 40 deletions(-) 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' ) );