Changeset 40240 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 03/08/2017 12:04:05 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r40239 r40240 175 175 $_POST = array(); 176 176 self::flush_cache(); 177 }178 179 /**180 * Allow tests to be skipped on some automated runs181 *182 * For test runs on Travis for something other than trunk/master183 * we want to skip tests that only need to run for master.184 */185 public function skipOnAutomatedBranches() {186 // gentenv can be disabled187 if ( ! function_exists( 'getenv' ) ) {188 return false;189 }190 191 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables192 $travis_branch = getenv( 'TRAVIS_BRANCH' );193 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' );194 195 if ( false !== $travis_pull_request && 'master' !== $travis_branch ) {196 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' );197 }198 177 } 199 178
Note: See TracChangeset
for help on using the changeset viewer.