Changeset 33937 for trunk/tests/phpunit/tests/basic.php
- Timestamp:
- 09/07/2015 05:22:03 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/basic.php
r31622 r33937 27 27 list( $version ) = explode( '-', $GLOBALS['wp_version'] ); 28 28 $this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." ); 29 30 preg_match( '#Recommendations.*PHP</a> version <strong>([0-9.]*)#s', $readme, $matches ); 31 32 $response = wp_remote_get( 'https://secure.php.net/supported-versions.php' ); 33 if ( 200 != wp_remote_retrieve_response_code( $response ) ) { 34 $this->markTestSkipped( 'Could not contact PHP.net to check versions.' ); 35 } 36 $php = wp_remote_retrieve_body( $response ); 37 38 preg_match_all( '#<tr class="stable">\s*<td>\s*<a [^>]*>\s*([0-9.]*)#s', $php, $phpmatches ); 39 40 $this->assertContains( $matches[1], $phpmatches[1] ); 29 41 } 30 42
Note: See TracChangeset
for help on using the changeset viewer.