Skip to content

Commit 4351e82

Browse files
committed
* Use cgr to avoid dependency conflicts
* Update Path to core phpunit6-compat.php
1 parent 95c1307 commit 4351e82

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ before_script:
5555
- |
5656
case "$TRAVIS_PHP_VERSION" in
5757
5.6|5.5|5.4|5.3)
58-
composer global require "phpunit/phpunit:^4"
58+
composer global require consolidation/cgr
59+
PATH="$(composer config -g home)/vendor/bin:$PATH"
60+
cgr "phpunit/phpunit:^4"
5961
;;
6062
5.2)
61-
;;
63+
;;
6264
*)
63-
composer global require "phpunit/phpunit:6"
65+
composer global require consolidation/cgr
66+
PATH="$(composer config -g home)/vendor/bin:$PATH"
67+
cgr "phpunit/phpunit:^6"
6468
;;
6569
esac
6670
- |

tests/phpunit/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function _manually_load_plugin() {
3131
}
3232

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

0 commit comments

Comments
 (0)