WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/17/2017 03:39:36 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Add assertNotFalse() method to WP_UnitTestCase and use it where appropriate.

Props peterwilsoncc.
Fixes #39219.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r39913 r39919  
    455455            $this->assertNotEmpty( $sub_array );
    456456        }
     457    }
     458
     459    /**
     460     * Asserts that a condition is not false.
     461     *
     462     * @param bool   $condition
     463     * @param string $message
     464     *
     465     * @throws PHPUnit_Framework_AssertionFailedError
     466     */
     467    public static function assertNotFalse( $condition, $message = '' ) {
     468        self::assertThat( $condition, self::logicalNot( self::isFalse() ), $message );
    457469    }
    458470
Note: See TracChangeset for help on using the changeset viewer.