Changeset 51561
- Timestamp:
- 08/06/2021 12:44:00 AM (3 years ago)
- Location:
- trunk/tests/phpunit/includes
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r51481 r51561 13 13 * All WordPress unit tests should inherit from this class. 14 14 */ 15 abstract class WP_UnitTestCase_Base extends PHPUnit \Framework\TestCase {15 abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase { 16 16 17 17 protected static $forced_tickets = array(); -
trunk/tests/phpunit/includes/bootstrap.php
r51560 r51561 208 208 unset( $phpunit_polyfills_autoloader ); 209 209 210 require __DIR__ . '/phpunit-adapter-testcase.php'; 210 211 require __DIR__ . '/abstract-testcase.php'; 211 212 require __DIR__ . '/testcase.php'; -
trunk/tests/phpunit/includes/testcase.php
r51560 r51561 1 1 <?php 2 3 use Yoast\PHPUnitPolyfills\Helpers\AssertAttributeHelper;4 use Yoast\PHPUnitPolyfills\Polyfills\AssertClosedResource;5 use Yoast\PHPUnitPolyfills\Polyfills\AssertEqualsSpecializations;6 use Yoast\PHPUnitPolyfills\Polyfills\AssertFileDirectory;7 use Yoast\PHPUnitPolyfills\Polyfills\AssertFileEqualsSpecializations;8 use Yoast\PHPUnitPolyfills\Polyfills\AssertionRenames;9 use Yoast\PHPUnitPolyfills\Polyfills\AssertIsType;10 use Yoast\PHPUnitPolyfills\Polyfills\AssertNumericType;11 use Yoast\PHPUnitPolyfills\Polyfills\AssertObjectEquals;12 use Yoast\PHPUnitPolyfills\Polyfills\AssertStringContains;13 use Yoast\PHPUnitPolyfills\Polyfills\EqualToSpecializations;14 use Yoast\PHPUnitPolyfills\Polyfills\ExpectException;15 use Yoast\PHPUnitPolyfills\Polyfills\ExpectExceptionMessageMatches;16 use Yoast\PHPUnitPolyfills\Polyfills\ExpectExceptionObject;17 use Yoast\PHPUnitPolyfills\Polyfills\ExpectPHPException;18 19 2 /** 20 * Basic abstract test class with PHPUnit cross-version adapter layer. 21 * 22 * This adapter layer polyfills all PHPUnit assertion and expectation 23 * methods which were added between PHPUnit 4.8 - 9.5 to allow tests 24 * to benefit from the full range of available PHPUnit methods. 25 * 26 * See {@link https://github.com/Yoast/PHPUnit-Polyfills} for full 27 * documentation on the available polyfills. 3 * Basic abstract test class. 28 4 * 29 5 * All WordPress unit tests should inherit from this class. 30 6 */ 31 class WP_UnitTestCase extends WP_UnitTestCase_Base { 32 33 use AssertAttributeHelper; 34 use AssertClosedResource; 35 use AssertEqualsSpecializations; 36 use AssertFileDirectory; 37 use AssertFileEqualsSpecializations; 38 use AssertionRenames; 39 use AssertIsType; 40 use AssertNumericType; 41 use AssertObjectEquals; 42 use AssertStringContains; 43 use EqualToSpecializations; 44 use ExpectException; 45 use ExpectExceptionMessageMatches; 46 use ExpectExceptionObject; 47 use ExpectPHPException; 48 } 7 abstract class WP_UnitTestCase extends WP_UnitTestCase_Base {}
Note: See TracChangeset
for help on using the changeset viewer.