Build/Test tools: Revert [40239] due to unrelated changes.

See #39486


git-svn-id: https://develop.svn.wordpress.org/trunk@40240 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2017-03-08 00:04:05 +00:00
parent 868eba6850
commit 0060ffaa8c
5 changed files with 18 additions and 50 deletions

View File

@@ -176,27 +176,6 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
self::flush_cache();
}
/**
* Allow tests to be skipped on some automated runs
*
* For test runs on Travis for something other than trunk/master
* we want to skip tests that only need to run for master.
*/
public function skipOnAutomatedBranches() {
// gentenv can be disabled
if ( ! function_exists( 'getenv' ) ) {
return false;
}
// https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
$travis_branch = getenv( 'TRAVIS_BRANCH' );
$travis_pull_request = getenv( 'TRAVIS_PULL_REQUEST' );
if ( false !== $travis_pull_request && 'master' !== $travis_branch ) {
$this->markTestSkipped( 'For automated test runs, this test is only run on trunk/master' );
}
}
/**
* Unregister existing post types and register defaults.
*