Taxonomy: More tests for `unregister_taxonomy()`.

See #35227


git-svn-id: https://develop.svn.wordpress.org/trunk@36247 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2016-01-09 23:34:27 +00:00
parent 2670f66c76
commit 6681e9701c
1 changed files with 11 additions and 0 deletions

View File

@ -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' ) );
}
}