Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ before_script:
- |
case "$TRAVIS_PHP_VERSION" in
5.6|5.5|5.4|5.3)
composer global require "phpunit/phpunit:^4"
composer global require consolidation/cgr
PATH="$(composer config -g home)/vendor/bin:$PATH"
cgr "phpunit/phpunit:^4"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this! I've never seen this package.

;;
5.2)
;;
*)
composer global require "phpunit/phpunit:6"
composer global require consolidation/cgr
PATH="$(composer config -g home)/vendor/bin:$PATH"
cgr "phpunit/phpunit:^6"
;;
esac
- |
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function _manually_load_plugin() {
}

// Core started including their own phpunit6-compat, so we should use that if we can.
if ( ! file_exists( $test_root . '/includes/phpunit6-compat.php' ) ) {
if ( ! file_exists( $test_root . '/includes/phpunit6/compat.php' ) ) {
// WordPress versions before 4.8 will be incompatible with newer PHPUnit versions.
if ( version_compare( getenv( 'WP_VERSION' ), '4.8', '<' ) && class_exists( 'PHPUnit\Runner\Version' ) ) {
require_once dirname( __FILE__ ) . '/phpunit6-compat.php';
Expand Down