mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 03:30:06 +00:00
Ignore case when checking string 'false' in wp_validate_boolean().
Props TobiasBg, kitchin. Fixes #30238. git-svn-id: https://develop.svn.wordpress.org/trunk@30207 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -56,4 +56,20 @@ class Tests_Functions_WpValidateBoolean extends WP_UnitTestCase {
|
||||
// Differs from (bool) conversion.
|
||||
$this->assertFalse( wp_validate_boolean( 'false' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 30238
|
||||
*/
|
||||
public function test_string_false_uppercase() {
|
||||
// Differs from (bool) conversion.
|
||||
$this->assertFalse( wp_validate_boolean( 'FALSE' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 30238
|
||||
*/
|
||||
public function test_string_false_mixedcase() {
|
||||
// Differs from (bool) conversion.
|
||||
$this->assertFalse( wp_validate_boolean( 'FaLsE' ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user