Use more descriptive names for register_post_type()
and register_taxonomy()
tests with too long and too short names.
see #31134, #31135. git-svn-id: https://develop.svn.wordpress.org/trunk@31457 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b52cb0346e
commit
78b02ec722
@ -24,7 +24,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
|
||||
*
|
||||
* @expectedIncorrectUsage register_post_type
|
||||
*/
|
||||
function test_register_post_type_length_long() {
|
||||
function test_register_post_type_with_too_long_name() {
|
||||
// post type too long
|
||||
$this->assertInstanceOf( 'WP_Error', register_post_type( 'abcdefghijklmnopqrstuvwxyz0123456789' ) );
|
||||
}
|
||||
@ -34,7 +34,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
|
||||
*
|
||||
* @expectedIncorrectUsage register_post_type
|
||||
*/
|
||||
function test_register_post_type_length_short() {
|
||||
function test_register_post_type_with_empty_name() {
|
||||
// post type too short
|
||||
$this->assertInstanceOf( 'WP_Error', register_post_type( '' ) );
|
||||
}
|
||||
|
@ -153,24 +153,24 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
unset($GLOBALS['wp_taxonomies'][$tax]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 31135
|
||||
*
|
||||
* @expectedIncorrectUsage register_taxonomy
|
||||
*/
|
||||
function test_register_short_taxonomy() {
|
||||
$this->assertInstanceOf( 'WP_Error', register_taxonomy( '', 'post', array() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 21593
|
||||
*
|
||||
* @expectedIncorrectUsage register_taxonomy
|
||||
*/
|
||||
function test_register_long_taxonomy() {
|
||||
function test_register_taxonomy_with_too_long_name() {
|
||||
$this->assertInstanceOf( 'WP_Error', register_taxonomy( 'abcdefghijklmnopqrstuvwxyz0123456789', 'post', array() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 31135
|
||||
*
|
||||
* @expectedIncorrectUsage register_taxonomy
|
||||
*/
|
||||
function test_register_taxonomy_with_empty_name() {
|
||||
$this->assertInstanceOf( 'WP_Error', register_taxonomy( '', 'post', array() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 26948
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user