Changeset 34247 for trunk/tests/phpunit/tests/taxonomy.php
- Timestamp:
- 09/16/2015 07:04:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/taxonomy.php
r33182 r34247 443 443 _unregister_post_type( 'wptests_pt' ); 444 444 } 445 446 /** 447 * @ticket 21949 448 */ 449 public function test_nonpublic_taxonomy_should_not_be_queryable_using_taxname_query_var() { 450 register_taxonomy( 'wptests_tax', 'post', array( 451 'public' => false, 452 ) ); 453 454 $t = $this->factory->term->create_and_get( array( 455 'taxonomy' => 'wptests_tax', 456 ) ); 457 458 $p = $this->factory->post->create(); 459 wp_set_object_terms( $p, $t->slug, 'wptests_tax' ); 460 461 $this->go_to( '/?wptests_tax=' . $t->slug ); 462 463 $this->assertFalse( is_tax( 'wptests_tax' ) ); 464 } 465 466 /** 467 * @ticket 21949 468 */ 469 public function test_nonpublic_taxonomy_should_not_be_queryable_using_taxonomy_and_term_vars() { 470 register_taxonomy( 'wptests_tax', 'post', array( 471 'public' => false, 472 ) ); 473 474 $t = $this->factory->term->create_and_get( array( 475 'taxonomy' => 'wptests_tax', 476 ) ); 477 478 $p = $this->factory->post->create(); 479 wp_set_object_terms( $p, $t->slug, 'wptests_tax' ); 480 481 $this->go_to( '/?taxonomy=wptests_tax&term=' . $t->slug ); 482 483 $this->assertFalse( is_tax( 'wptests_tax' ) ); 484 } 445 485 }
Note: See TracChangeset
for help on using the changeset viewer.