Changeset 40250
- Timestamp:
- 03/08/2017 12:51:22 AM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/tests/phpunit/includes/testcase.php
r39627 r40250 175 175 $_POST = array(); 176 176 self::flush_cache(); 177 } 178 179 /** 180 * Allow tests to be skipped on some automated runs 181 * 182 * For test runs on Travis for something other than trunk/master 183 * we want to skip tests that only need to run for master. 184 */ 185 public function skipOnAutomatedBranches() { 186 // gentenv can be disabled 187 if ( ! function_exists( 'getenv' ) ) { 188 return false; 189 } 190 191 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 192 $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 } 177 198 } 178 199 -
branches/4.7/tests/phpunit/tests/basic.php
r39480 r40250 9 9 10 10 function test_license() { 11 // This test is designed to only run on trunk/master 12 $this->skipOnAutomatedBranches(); 13 11 14 $license = file_get_contents( ABSPATH . 'license.txt' ); 12 15 preg_match( '#Copyright 2011-(\d+) by the contributors#', $license, $matches ); -
branches/4.7/tests/phpunit/tests/external-http/basic.php
r39582 r40250 6 6 7 7 function test_readme() { 8 // This test is designed to only run on trunk/master 9 $this->skipOnAutomatedBranches(); 10 8 11 $readme = file_get_contents( ABSPATH . 'readme.html' ); 9 12 preg_match( '#<br /> Version (.*)#', $readme, $matches );
Note: See TracChangeset
for help on using the changeset viewer.