Make WordPress Core

Changeset 36764


Ignore:
Timestamp:
02/28/2016 07:55:48 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Ad a unit test for bool_from_yn().

Props borgesbruno.
Fixes #35972.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions.php

    r35276 r36764  
    7272        $this->assertFalse(size_format('baba'));
    7373        $this->assertFalse(size_format(array()));
     74    }
     75
     76    /**
     77     * @ticket 35972
     78     */
     79    function test_bool_from_yn() {
     80        $this->assertTrue( bool_from_yn( 'Y' ) );
     81        $this->assertTrue( bool_from_yn( 'y' ) );
     82        $this->assertFalse( bool_from_yn( 'n' ) );
    7483    }
    7584
Note: See TracChangeset for help on using the changeset viewer.