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:
Sergey Biryukov 2013-12-28 05:24:32 +00:00
parent f8338aa3c3
commit 3852dd4936

View File

@ -136,6 +136,19 @@ class Tests_Query_TaxQuery extends WP_UnitTestCase {
$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() {
// tax + tag with tax added
$this->go_to( home_url( "/testtax/tax-slug2/?tag_id=$this->tag_id" ) );