From 2c15e0c2866d0b6943a15cf35c0acea0f1f7a13f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 20 Dec 2019 12:13:10 +0000 Subject: [PATCH] Tests: Don't fail the test in `WP_UnitTestCase_Base::skipOnAutomatedBranches()` if Travis environment variables are unavailable, it prevents from running the test locally. Follow-up to [47000]. See #49050. git-svn-id: https://develop.svn.wordpress.org/trunk@47001 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/abstract-testcase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/includes/abstract-testcase.php b/tests/phpunit/includes/abstract-testcase.php index 8b61afe660..a15a3ea15d 100644 --- a/tests/phpunit/includes/abstract-testcase.php +++ b/tests/phpunit/includes/abstract-testcase.php @@ -191,7 +191,7 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase { $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); if ( ! $travis_branch || ! $travis_pull_request ) { - $this->fail( 'Could not read TRAVIS_BRANCH or TRAVIS_PULL_REQUEST' ); + return; } if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) {