diff --git a/tests/phpunit/tests/taxonomy.php b/tests/phpunit/tests/taxonomy.php index 86cf6226f3..e4185fce29 100644 --- a/tests/phpunit/tests/taxonomy.php +++ b/tests/phpunit/tests/taxonomy.php @@ -632,4 +632,15 @@ class Tests_Taxonomy extends WP_UnitTestCase { $this->assertTrue( unregister_taxonomy( 'foo' ) ); $this->assertSame( array(), $wp_filter['wp_ajax_add-foo'] ); } + + /** + * @ticket 35227 + */ + public function test_taxonomy_does_not_exist_after_unregister_taxonomy() { + register_taxonomy( 'foo', 'post' ); + $this->assertTrue( taxonomy_exists( 'foo' ) ); + unregister_taxonomy( 'foo' ); + $this->assertFalse( taxonomy_exists( 'foo' ) ); + } + }