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:
parent
2670f66c76
commit
6681e9701c
@ -632,4 +632,15 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
|||||||
$this->assertTrue( unregister_taxonomy( 'foo' ) );
|
$this->assertTrue( unregister_taxonomy( 'foo' ) );
|
||||||
$this->assertSame( array(), $wp_filter['wp_ajax_add-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' ) );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user