Changeset 40243 for branches/4.4/tests/phpunit/includes/testcase.php
- Timestamp:
- 03/08/2017 12:31:45 AM (8 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
-
branches/4.4/tests/phpunit/includes/testcase.php
r35350 r40243 147 147 $_POST = array(); 148 148 $this->flush_cache(); 149 } 150 151 /** 152 * Allow tests to be skipped on some automated runs 153 * 154 * For test runs on Travis for something other than trunk/master 155 * we want to skip tests that only need to run for master. 156 */ 157 public function skipOnAutomatedBranches() { 158 // gentenv can be disabled 159 if ( ! function_exists( 'getenv' ) ) { 160 return false; 161 } 162 163 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 164 $travis_branch = getenv( 'TRAVIS_BRANCH' ); 165 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 166 167 if ( false !== $travis_pull_request && 'master' !== $travis_branch ) { 168 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 169 } 149 170 } 150 171
Note: See TracChangeset
for help on using the changeset viewer.