Changeset 35256
- Timestamp:
- 10/18/2015 01:34:29 AM (9 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rewrite.php
r35242 r35256 291 291 292 292 /** 293 * @ticket 25143294 */295 public function test_is_home_should_be_false_when_visiting_custom_endpoint_without_a_registered_query_var_and_page_on_front_is_set() {296 297 $page_id = self::factory()->post->create( array( 'post_type' => 'page' ) );298 update_option( 'show_on_front', 'page' );299 update_option( 'page_on_front', $page_id );300 301 add_rewrite_endpoint( 'test', EP_ALL, false );302 flush_rewrite_rules();303 304 $this->go_to( home_url( '/test/1' ) );305 306 $this->assertQueryTrue( 'is_front_page', 'is_page', 'is_singular' );307 $this->assertFalse( is_home() );308 }309 310 /**311 293 * @ticket 21970 312 294 */ -
trunk/tests/phpunit/tests/rewrite/addRewriteEndpoint.php
r32293 r35256 48 48 $this->assertSame( $qvs, $GLOBALS['wp']->public_query_vars ); 49 49 } 50 51 /** 52 * @ticket 25143 53 */ 54 public function test_is_home_should_be_false_when_visiting_custom_endpoint_without_a_registered_query_var_and_page_on_front_is_set() { 55 56 $page_id = self::factory()->post->create( array( 'post_type' => 'page' ) ); 57 update_option( 'show_on_front', 'page' ); 58 update_option( 'page_on_front', $page_id ); 59 60 add_rewrite_endpoint( 'test', EP_ALL, false ); 61 flush_rewrite_rules(); 62 63 $this->go_to( home_url( '/test/1' ) ); 64 65 $this->assertQueryTrue( 'is_front_page', 'is_page', 'is_singular' ); 66 $this->assertFalse( is_home() ); 67 } 50 68 }
Note: See TracChangeset
for help on using the changeset viewer.