From 78b02ec722296b196e21fae05a621001bd6c8b22 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 13 Feb 2015 23:33:56 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/post/types.php | 4 ++-- tests/phpunit/tests/taxonomy.php | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/phpunit/tests/post/types.php b/tests/phpunit/tests/post/types.php index e1582d5d8d..31be3359f2 100644 --- a/tests/phpunit/tests/post/types.php +++ b/tests/phpunit/tests/post/types.php @@ -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( '' ) ); } diff --git a/tests/phpunit/tests/taxonomy.php b/tests/phpunit/tests/taxonomy.php index 529b18cf74..4280928332 100644 --- a/tests/phpunit/tests/taxonomy.php +++ b/tests/phpunit/tests/taxonomy.php @@ -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 */