Add unit test for [26874]. see #26728.
git-svn-id: https://develop.svn.wordpress.org/trunk@26875 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f8338aa3c3
commit
3852dd4936
@ -136,6 +136,19 @@ class Tests_Query_TaxQuery extends WP_UnitTestCase {
|
|||||||
$this->assertEquals( $query->get_queried_object(), $this->uncat );
|
$this->assertEquals( $query->get_queried_object(), $this->uncat );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ticket 26728
|
||||||
|
*/
|
||||||
|
function test_tax_action_tax() {
|
||||||
|
// tax with tax added
|
||||||
|
$this->go_to( home_url( '/testtax/tax-slug2/' ) );
|
||||||
|
$this->assertQueryTrue( 'is_tax', 'is_archive' );
|
||||||
|
$this->assertNotEmpty( get_query_var( 'tax_query' ) );
|
||||||
|
$this->assertNotEmpty( get_query_var( 'taxonomy' ) );
|
||||||
|
$this->assertNotEmpty( get_query_var( 'term_id' ) );
|
||||||
|
$this->assertEquals( get_queried_object(), get_term( $this->tax_id, 'testtax' ) );
|
||||||
|
}
|
||||||
|
|
||||||
function test_tax_query_tag_action_tax() {
|
function test_tax_query_tag_action_tax() {
|
||||||
// tax + tag with tax added
|
// tax + tag with tax added
|
||||||
$this->go_to( home_url( "/testtax/tax-slug2/?tag_id=$this->tag_id" ) );
|
$this->go_to( home_url( "/testtax/tax-slug2/?tag_id=$this->tag_id" ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user