You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5b4b10b
Browse filesBrowse the repository at this point in the historyBrowse files
Tests: Check readme recommendations without external HTTP requests.
Run the offline check for recommended PHP, MySQL, and MariaDB version declarations in the default suite. Keep `external-http` on the three methods that check versions against external services.
Developed in: #14686
Props devmuhib, huzaifaalmesbah.
See #63914.
git-svn-id: https://develop.svn.wordpress.org/trunk@64732 602fd350-edb4-49c9-b593-d223f7449a82
$this->assertIsString( $readme, 'readme.html should exist and be readable.' );
20
+
21
+
$this->assertSame( 1, preg_match( '#Recommendations.*PHP</a> version <strong>([0-9.]+)#s', $readme, $php_matches ), 'readme.html should declare a recommended PHP version.' );
22
+
$this->assertNotEmpty( $php_matches[1], 'Recommended PHP version should not be empty.' );
23
+
24
+
$this->assertSame( 1, preg_match( '#Recommendations.*MySQL</a> version <strong>([0-9.]+)#s', $readme, $mysql_matches ), 'readme.html should declare a recommended MySQL version.' );
25
+
$this->assertNotEmpty( $mysql_matches[1], 'Recommended MySQL version should not be empty.' );
26
+
27
+
$this->assertSame( 1, preg_match( '#Recommendations.*MariaDB</a> version <strong>([0-9.]+)#s', $readme, $mariadb_matches ), 'readme.html should declare a recommended MariaDB version.' );
28
+
$this->assertNotEmpty( $mariadb_matches[1], 'Recommended MariaDB version should not be empty.' );
29
+
}
30
+
10
31
/**
11
32
* @coversNothing
33
+
*
34
+
* @group external-http
12
35
*/
13
36
publicfunctiontest_readme_php_version() {
14
37
// This test is designed to only run on trunk.
@@ -27,6 +50,8 @@ public function test_readme_php_version() {
27
50
28
51
/**
29
52
* @coversNothing
53
+
*
54
+
* @group external-http
30
55
*/
31
56
publicfunctiontest_readme_mysql_version() {
32
57
// This test is designed to only run on trunk.
@@ -63,6 +88,8 @@ public function test_readme_mysql_version() {
0 commit comments