mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 21:39:50 +01:00
Docs: Improve some DocBlocks in wp_validate_boolean()
tests for consistency.
Follow-up to [46159], [46224], [52775]. See #54725, #54729. git-svn-id: https://develop.svn.wordpress.org/trunk@52776 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d0f8d4ff70
commit
2836ece22f
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Tests the wp_validate_boolean function.
|
||||
* Tests for the wp_validate_boolean() function.
|
||||
*
|
||||
* @group functions.php
|
||||
* @covers ::wp_validate_boolean
|
||||
@ -11,24 +11,27 @@ class Tests_Functions_wpValidateBoolean extends WP_UnitTestCase {
|
||||
/**
|
||||
* Test wp_validate_boolean().
|
||||
*
|
||||
* @dataProvider data_provider
|
||||
*
|
||||
* @param mixed $test_value
|
||||
* @param bool $expected
|
||||
* @dataProvider data_wp_validate_boolean
|
||||
*
|
||||
* @ticket 30238
|
||||
* @ticket 39868
|
||||
*
|
||||
* @param mixed $test_value
|
||||
* @param bool $expected
|
||||
*/
|
||||
public function test_wp_validate_boolean( $test_value, $expected ) {
|
||||
$this->assertSame( $expected, wp_validate_boolean( $test_value ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides test scenarios for all possible scenarios in wp_validate_boolean().
|
||||
* Data provider for test_wp_validate_boolean().
|
||||
*
|
||||
* @return array
|
||||
* @return array[] Test parameters {
|
||||
* @type string $test_value Test value.
|
||||
* @type string $expected Expected return value.
|
||||
* }
|
||||
*/
|
||||
public function data_provider() {
|
||||
public function data_wp_validate_boolean() {
|
||||
$std = new \stdClass();
|
||||
|
||||
return array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user