Skip to content

Commit

Permalink
Merge pull request #100 from wp-cli/add/wp-cli-testcase
Browse files Browse the repository at this point in the history
Add centralized test case with polyfills
  • Loading branch information
schlessera authored Dec 7, 2020
2 parents eaf01d7 + 3998173 commit fd0f7b7
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 fd0f7b7

Please sign in to comment.