Changeset 47000
- Timestamp:
- 12/20/2019 01:10:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r46986 r47000 187 187 */ 188 188 public function skipOnAutomatedBranches() { 189 // gentenv can be disabled190 if ( ! function_exists( 'getenv' ) ) {191 return false;192 }193 194 189 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 195 190 $travis_branch = getenv( 'TRAVIS_BRANCH' ); 196 191 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 197 192 198 if ( false !== $travis_pull_request && 'master' !== $travis_branch ) { 193 if ( ! $travis_branch || ! $travis_pull_request ) { 194 $this->fail( 'Could not read TRAVIS_BRANCH or TRAVIS_PULL_REQUEST' ); 195 } 196 197 if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) { 199 198 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 200 199 }
Note: See TracChangeset
for help on using the changeset viewer.