Changeset 40245 for branches/4.2/tests/phpunit/includes/testcase.php
- Timestamp:
- 03/08/2017 12:41:15 AM (9 years ago)
- Location:
- branches/4.2
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/includes/testcase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2
-
branches/4.2/tests/phpunit/includes/testcase.php
r31515 r40245 89 89 $_POST = array(); 90 90 $this->flush_cache(); 91 } 92 93 /** 94 * Allow tests to be skipped on some automated runs 95 * 96 * For test runs on Travis for something other than trunk/master 97 * we want to skip tests that only need to run for master. 98 */ 99 public function skipOnAutomatedBranches() { 100 // gentenv can be disabled 101 if ( ! function_exists( 'getenv' ) ) { 102 return false; 103 } 104 105 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 106 $travis_branch = getenv( 'TRAVIS_BRANCH' ); 107 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 108 109 if ( false !== $travis_pull_request && 'master' !== $travis_branch ) { 110 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 111 } 91 112 } 92 113
Note: See TracChangeset
for help on using the changeset viewer.