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
This commit is contained in:
Sergey Biryukov 2020-06-30 00:41:57 +00:00
parent 6dca33c0b1
commit 43977e7689
3 changed files with 12 additions and 22 deletions

View File

@ -11,30 +11,28 @@
class Tests_Functions_Deprecated extends WP_UnitTestCase { 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[] * @var string[]
*/ */
protected $_deprecated_functions = array(); 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[] * @var string[]
*/ */
protected $_deprecated_arguments = array(); 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[] * @var string[]
*/ */
protected $_deprecated_files = array(); protected $_deprecated_files = array();
/** /**
* Set up the test fixture * Sets up the test fixture.
*
* @return void
*/ */
public function setUp() { public function setUp() {
parent::setUp(); parent::setUp();
@ -50,9 +48,7 @@ class Tests_Functions_Deprecated extends WP_UnitTestCase {
} }
/** /**
* Tear down the test fixture * Tears down the test fixture.
*
* @return void
*/ */
public function teardown() { public function teardown() {
remove_action( 'deprecated_function_run', array( $this, 'deprecated_function' ), 10, 3 ); 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 $function
* @param string $replacement * @param string $replacement
* @param float $version * @param float $version
* @return void
*/ */
public function deprecated_function( $function, $replacement, $version ) { public function deprecated_function( $function, $replacement, $version ) {
$this->_deprecated_functions[] = array( $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 $argument
* @param string $message * @param string $message
* @param float $version * @param float $version
* @return void
*/ */
public function deprecated_argument( $argument, $message, $version ) { public function deprecated_argument( $argument, $message, $version ) {
$this->_deprecated_arguments[] = array( $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 $argument
* @param string $message * @param string $message
* @param float $version * @param float $version
* @return void
*/ */
public function deprecated_file( $file, $version, $replacement, $message ) { public function deprecated_file( $file, $version, $replacement, $message ) {
$this->_deprecated_files[] = array( $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 $type argument|function|file
* @param string $name * @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 * @ticket 6821
* @expectedDeprecated wp_save_image_file * @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 * @ticket 6821
*/ */

View File

@ -130,9 +130,7 @@ class Tests_Image_Meta extends WP_UnitTestCase {
} }
/** /**
* wp_read_image_metadata() should false if the image file doesn't exist * wp_read_image_metadata() should return false if the image file doesn't exist.
*
* @return void
*/ */
public function test_missing_image_file() { public function test_missing_image_file() {
$out = wp_read_image_metadata( DIR_TESTDATA . '/images/404_image.png' ); $out = wp_read_image_metadata( DIR_TESTDATA . '/images/404_image.png' );

View File

@ -73,7 +73,6 @@ class Tests_Kses extends WP_UnitTestCase {
* @param string $source Source HTML. * @param string $source Source HTML.
* @param string $context Context to use for parsing source. * @param string $context Context to use for parsing source.
* @param string $expected Expected output following KSES parsing. * @param string $expected Expected output following KSES parsing.
* @return void
*/ */
function test_wp_kses_video( $source, $context, $expected ) { function test_wp_kses_video( $source, $context, $expected ) {
$actual = wp_kses( $source, $context ); $actual = wp_kses( $source, $context );