diff --git tests/phpunit/tests/query/conditionals.php tests/phpunit/tests/query/conditionals.php
index 3c27388..3a6361e 100644
|
|
|
class Tests_Query_Conditionals extends WP_UnitTestCase { |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
| | 141 | /** |
| | 142 | * @ticket 31935 |
| | 143 | */ |
| | 144 | function test_page_feed_for_deleted_page() { |
| | 145 | $page_id = $this->factory->post->create( array( 'post_type' => 'page', 'post_title' => 'to-be-deleted-page' ) ); |
| | 146 | $url = get_permalink( $page_id ); |
| | 147 | |
| | 148 | // $url will now point to a deleted page |
| | 149 | wp_delete_post( $page_id ); |
| | 150 | |
| | 151 | $this->go_to("{$url}feed/"); |
| | 152 | |
| | 153 | // make sure the correct wp_query flags are set |
| | 154 | $this->assertQueryTrue('is_404', 'is_feed'); |
| | 155 | } |
| | 156 | |
| 141 | 157 | function test_page_feed_with_no_comments() { |
| 142 | 158 | $page_ids = array(); |
| 143 | 159 | $page_ids[] = $page_id = $this->factory->post->create( array( 'post_type' => 'page', 'post_title' => 'parent-page' ) ); |