Skip to content

Commit

Permalink
Add centralized test case with polyfills
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed Dec 7, 2020
1 parent eaf01d7 commit 3998173
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 1 addition & 7 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,9 @@
: '2.x.x'
);

/**
* Compatibility with PHPUnit 6+
*/
if ( class_exists( 'PHPUnit\Runner\Version' ) ) {
require_once __DIR__ . '/phpunit6-compat.php';
}

require_once VENDOR_DIR . '/autoload.php';
require_once WP_CLI_ROOT . '/php/utils.php';
require_once __DIR__ . '/wp-cli-testcase.php';

function wpcli_tests_include_config( array $config_filenames = [] ) {
$config_filename = false;
Expand Down
12 changes: 12 additions & 0 deletions tests/wp-cli-testcase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace WP_CLI\Tests;

use Yoast\PHPUnitPolyfills\TestCases\TestCase as PolyfilledTestCase;

/**
* WP-CLI base test case.
*/
class TestCase extends PolyfilledTestCase {

}

0 comments on commit 3998173

Please sign in to comment.