Build/Test tools: In Travis, skip some tests when not on trunk.

This skips time sensitive tests (copyright year and PHP/MySQL version requirements) when tests are run on branches on Travis.

Props netweb, jorbin

Fixes #39486


git-svn-id: https://develop.svn.wordpress.org/trunk@40241 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2017-03-08 00:06:12 +00:00
parent 0060ffaa8c
commit 74e02a21b8
3 changed files with 27 additions and 0 deletions

View File

@@ -5,6 +5,9 @@
class Tests_External_HTTP_Basic extends WP_UnitTestCase {
function test_readme() {
// This test is designed to only run on trunk/master
$this->skipOnAutomatedBranches();
$readme = file_get_contents( ABSPATH . 'readme.html' );
preg_match( '#Recommendations.*PHP</a> version <strong>([0-9.]*)#s', $readme, $matches );