From 43977e768980e6ba4c32d8934e9d48d5fa619543 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 30 Jun 2020 00:41:57 +0000 Subject: [PATCH] Docs: Remove `@return void` from some tests, per the documentation standards. See #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48221 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/functions/deprecated.php | 29 ++++++++------------ tests/phpunit/tests/image/meta.php | 4 +-- tests/phpunit/tests/kses.php | 1 - 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/tests/phpunit/tests/functions/deprecated.php b/tests/phpunit/tests/functions/deprecated.php index f42d3daa92..758ab0228a 100644 --- a/tests/phpunit/tests/functions/deprecated.php +++ b/tests/phpunit/tests/functions/deprecated.php @@ -11,30 +11,28 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { /** - * List of functions that have been passed through _deprecated_function() + * List of functions that have been passed through _deprecated_function(). * * @var string[] */ protected $_deprecated_functions = array(); /** - * List of arguments that have been passed through _deprecated_argument() + * List of arguments that have been passed through _deprecated_argument(). * * @var string[] */ protected $_deprecated_arguments = array(); /** - * List of files that have been passed through _deprecated_file() + * List of files that have been passed through _deprecated_file(). * * @var string[] */ protected $_deprecated_files = array(); /** - * Set up the test fixture - * - * @return void + * Sets up the test fixture. */ public function setUp() { parent::setUp(); @@ -50,9 +48,7 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { } /** - * Tear down the test fixture - * - * @return void + * Tears down the test fixture. */ public function teardown() { remove_action( 'deprecated_function_run', array( $this, 'deprecated_function' ), 10, 3 ); @@ -65,12 +61,11 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { } /** - * Catch functions that have passed through _deprecated_function + * Catches functions that have passed through _deprecated_function(). * * @param string $function * @param string $replacement * @param float $version - * @return void */ public function deprecated_function( $function, $replacement, $version ) { $this->_deprecated_functions[] = array( @@ -81,12 +76,11 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { } /** - * Catch arguments that have passed through _deprecated_argument + * Catches arguments that have passed through _deprecated_argument(). * * @param string $argument * @param string $message * @param float $version - * @return void */ public function deprecated_argument( $argument, $message, $version ) { $this->_deprecated_arguments[] = array( @@ -97,12 +91,11 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { } /** - * Catch arguments that have passed through _deprecated_argument + * Catches arguments that have passed through _deprecated_argument(). * * @param string $argument * @param string $message * @param float $version - * @return void */ public function deprecated_file( $file, $version, $replacement, $message ) { $this->_deprecated_files[] = array( @@ -114,7 +107,7 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { } /** - * Check if something was deprecated + * Checks if something was deprecated. * * @param string $type argument|function|file * @param string $name @@ -143,7 +136,7 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { } /** - * Test that wp_save_image_file has a deprecated argument when passed a GD resource + * Tests that wp_save_image_file() has a deprecated argument when passed a GD resource. * * @ticket 6821 * @expectedDeprecated wp_save_image_file @@ -167,7 +160,7 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase { } /** - * Test that wp_save_image_file doesn't have a deprecated argument when passed a WP_Image_Editor + * Tests that wp_save_image_file() doesn't have a deprecated argument when passed a WP_Image_Editor. * * @ticket 6821 */ diff --git a/tests/phpunit/tests/image/meta.php b/tests/phpunit/tests/image/meta.php index f22bcca845..81d9d8e180 100644 --- a/tests/phpunit/tests/image/meta.php +++ b/tests/phpunit/tests/image/meta.php @@ -130,9 +130,7 @@ class Tests_Image_Meta extends WP_UnitTestCase { } /** - * wp_read_image_metadata() should false if the image file doesn't exist - * - * @return void + * wp_read_image_metadata() should return false if the image file doesn't exist. */ public function test_missing_image_file() { $out = wp_read_image_metadata( DIR_TESTDATA . '/images/404_image.png' ); diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index 3bf747ca40..69870a7033 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -73,7 +73,6 @@ class Tests_Kses extends WP_UnitTestCase { * @param string $source Source HTML. * @param string $context Context to use for parsing source. * @param string $expected Expected output following KSES parsing. - * @return void */ function test_wp_kses_video( $source, $context, $expected ) { $actual = wp_kses( $source, $context );