Ad a unit test for `bool_from_yn()`.

Props borgesbruno.
Fixes #35972.

git-svn-id: https://develop.svn.wordpress.org/trunk@36764 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2016-02-28 19:55:48 +00:00
parent f344da1aa6
commit a18e7ae7c3
1 changed files with 9 additions and 0 deletions

View File

@ -73,6 +73,15 @@ class Tests_Functions extends WP_UnitTestCase {
$this->assertFalse(size_format(array())); $this->assertFalse(size_format(array()));
} }
/**
* @ticket 35972
*/
function test_bool_from_yn() {
$this->assertTrue( bool_from_yn( 'Y' ) );
$this->assertTrue( bool_from_yn( 'y' ) );
$this->assertFalse( bool_from_yn( 'n' ) );
}
function test_path_is_absolute() { function test_path_is_absolute() {
if ( !is_callable('path_is_absolute') ) if ( !is_callable('path_is_absolute') )
$this->markTestSkipped(); $this->markTestSkipped();