From 3852dd4936351de6166822ded1e8fd943df41527 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 28 Dec 2013 05:24:32 +0000 Subject: [PATCH] Add unit test for [26874]. see #26728. git-svn-id: https://develop.svn.wordpress.org/trunk@26875 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/query/taxQuery.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/phpunit/tests/query/taxQuery.php b/tests/phpunit/tests/query/taxQuery.php index a52c3a7f29..096f5151c9 100644 --- a/tests/phpunit/tests/query/taxQuery.php +++ b/tests/phpunit/tests/query/taxQuery.php @@ -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" ) );