mirror of
git://develop.git.wordpress.org/
synced 2025-02-07 08:04:27 +01:00
Tests: Correct the tests for Site Health SQL versions matching readme.html
.
These tests should check the initial `$mysql_recommended_version` and `$mariadb_recommended_version` properties, as `WP_Site_Health::prepare_sql_data()` redefines the former with the latter to simplify further processing if MariaDB is used, leading to a test failure: {{{ Tests_Site_Health::test_mysql_recommended_version_matches_readme_html Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'5.7' +'10.3' }}} This commit uses the initial property values to ensure the correct versions are being compared. Follow-up to [54069]. See #55791. git-svn-id: https://develop.svn.wordpress.org/trunk@54076 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
af52988c22
commit
b48ec1408e
@ -34,15 +34,12 @@ class Tests_Admin_wpSiteHealth extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @ticket 55791
|
||||
* @covers ::prepare_sql_data()
|
||||
* @covers ::get_test_sql_server()
|
||||
* @covers ::__construct()
|
||||
*/
|
||||
public function test_mysql_recommended_version_matches_readme_html() {
|
||||
// This test is designed to only run on trunk.
|
||||
$this->skipOnAutomatedBranches();
|
||||
|
||||
$this->instance->get_test_sql_server();
|
||||
|
||||
$reflection = new ReflectionClass( $this->instance );
|
||||
$reflection_property = $reflection->getProperty( 'mysql_recommended_version' );
|
||||
$reflection_property->setAccessible( true );
|
||||
@ -56,15 +53,12 @@ class Tests_Admin_wpSiteHealth extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @ticket 55791
|
||||
* @covers ::prepare_sql_data()
|
||||
* @covers ::get_test_sql_server()
|
||||
* @covers ::__construct()
|
||||
*/
|
||||
public function test_mariadb_recommended_version_matches_readme_html() {
|
||||
// This test is designed to only run on trunk.
|
||||
$this->skipOnAutomatedBranches();
|
||||
|
||||
$this->instance->get_test_sql_server();
|
||||
|
||||
$reflection = new ReflectionClass( $this->instance );
|
||||
$reflection_property = $reflection->getProperty( 'mariadb_recommended_version' );
|
||||
$reflection_property->setAccessible( true );
|
||||
|
Loading…
x
Reference in New Issue
Block a user