Changeset 40249
- Timestamp:
- 03/08/2017 12:50:43 AM (8 years ago)
- Location:
- branches/4.6
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/tests/phpunit/includes/testcase.php
r37861 r40249 160 160 $_POST = array(); 161 161 $this->flush_cache(); 162 } 163 164 /** 165 * Allow tests to be skipped on some automated runs 166 * 167 * For test runs on Travis for something other than trunk/master 168 * we want to skip tests that only need to run for master. 169 */ 170 public function skipOnAutomatedBranches() { 171 // gentenv can be disabled 172 if ( ! function_exists( 'getenv' ) ) { 173 return false; 174 } 175 176 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 177 $travis_branch = getenv( 'TRAVIS_BRANCH' ); 178 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 179 180 if ( false !== $travis_pull_request && 'master' !== $travis_branch ) { 181 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 182 } 162 183 } 163 184 -
branches/4.6/tests/phpunit/tests/basic.php
r36856 r40249 8 8 9 9 function test_license() { 10 // This test is designed to only run on trunk/master 11 $this->skipOnAutomatedBranches(); 12 10 13 $license = file_get_contents( ABSPATH . 'license.txt' ); 11 14 preg_match( '#Copyright 2011-(\d+) by the contributors#', $license, $matches ); -
branches/4.6/tests/phpunit/tests/external-http/basic.php
r35172 r40249 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.