blob: 9edc885e6a1126d4aff1bd30b32b06e2cf433cfc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
require_once dirname( dirname( __FILE__ ) ) . '/abstract-testcase.php';
/**
* Defines a basic fixture to run multiple tests.
*
* Resets the state of the WordPress installation before and after every test.
*
* Includes utility functions and assertions useful for testing WordPress.
*
* All WordPress unit tests should inherit from this class.
*/
class WP_UnitTestCase extends WP_UnitTestCase_Base {
/**
* Asserts that a condition is not false.
*
* This method has been backported from a more recent PHPUnit version, as tests running on PHP 5.2 use
* PHPUnit 3.6.x.
*
* @since 4.7.4
*
* @param bool $condition Condition to check.
* @param string $message Optional. Message to display when the assertion fails.
*
* @throws PHPUnit_Framework_AssertionFailedError
*/
public static function assertNotFalse( $condition, string $message = '' ): void {
self::assertThat( $condition, self::logicalNot( self::isFalse() ), $message );
}
}
|