From 6681e9701c09a2cf9f5cb83f7783a2aaff2053e0 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 9 Jan 2016 23:34:27 +0000 Subject: [PATCH] Taxonomy: More tests for `unregister_taxonomy()`. See #35227 git-svn-id: https://develop.svn.wordpress.org/trunk@36247 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/taxonomy.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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' ) ); + } + }