Changeset 40247 for branches/4.0/tests/phpunit/includes/testcase.php
- Timestamp:
- 03/08/2017 12:45:51 AM (7 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
-
branches/4.0/tests/phpunit/includes/testcase.php
r29503 r40247 65 65 $_POST = array(); 66 66 $this->flush_cache(); 67 } 68 69 /** 70 * Allow tests to be skipped on some automated runs 71 * 72 * For test runs on Travis for something other than trunk/master 73 * we want to skip tests that only need to run for master. 74 */ 75 public function skipOnAutomatedBranches() { 76 // gentenv can be disabled 77 if ( ! function_exists( 'getenv' ) ) { 78 return false; 79 } 80 81 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 82 $travis_branch = getenv( 'TRAVIS_BRANCH' ); 83 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 84 85 if ( false !== $travis_pull_request && 'master' !== $travis_branch ) { 86 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 87 } 67 88 } 68 89
Note: See TracChangeset
for help on using the changeset viewer.