Changeset 40244 for branches/4.3
- Timestamp:
- 03/08/2017 12:38:38 AM (8 years ago)
- Location:
- branches/4.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
-
branches/4.3/tests/phpunit/includes/testcase.php
r32953 r40244 91 91 $_POST = array(); 92 92 $this->flush_cache(); 93 } 94 95 /** 96 * Allow tests to be skipped on some automated runs 97 * 98 * For test runs on Travis for something other than trunk/master 99 * we want to skip tests that only need to run for master. 100 */ 101 public function skipOnAutomatedBranches() { 102 // gentenv can be disabled 103 if ( ! function_exists( 'getenv' ) ) { 104 return false; 105 } 106 107 // https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables 108 $travis_branch = getenv( 'TRAVIS_BRANCH' ); 109 $travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' ); 110 111 if ( false !== $travis_pull_request && 'master' !== $travis_branch ) { 112 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 113 } 93 114 } 94 115 -
branches/4.3/tests/phpunit/tests/basic.php
r31622 r40244 30 30 31 31 function test_license() { 32 // This test is designed to only run on trunk/master 33 $this->skipOnAutomatedBranches(); 34 32 35 $license = file_get_contents( ABSPATH . 'license.txt' ); 33 36 preg_match( '#Copyright (\d+) by the contributors#', $license, $matches );
Note: See TracChangeset
for help on using the changeset viewer.