Changeset 49916 for trunk/tests/phpunit/includes/abstract-testcase.php
- Timestamp:
- 01/02/2021 12:19:41 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r49280 r49916 182 182 * Allow tests to be skipped on some automated runs. 183 183 * 184 * For test runs on Travis/GitHub Actions for something other than trunk/master, we want to skip tests that185 * only need to run for master.184 * For test runs on Travis/GitHub Actions for something other than trunk/master, 185 * we want to skip tests that only need to run for master. 186 186 */ 187 187 public function skipOnAutomatedBranches() { … … 194 194 $github_ref = getenv( 'GITHUB_REF' ); 195 195 196 if ( 'false' !== $github_event_name ) {196 if ( $github_event_name && 'false' !== $github_event_name ) { 197 197 // We're on GitHub Actions. 198 198 $skipped = array( 'pull_request', 'pull_request_target' ); … … 201 201 $this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' ); 202 202 } 203 } elseif ( 'false' !== $travis_branch ) {203 } elseif ( $travis_branch && 'false' !== $travis_branch ) { 204 204 // We're on Travis CI. 205 205 if ( 'master' !== $travis_branch || 'false' !== $travis_pull_request ) {
Note: See TracChangeset
for help on using the changeset viewer.