Tests: Skip strip_invalid_text()
test for big5 charset on MariaDB.
MariaDB doesn't support the tested configuration. Props ocean90. Fixes #33171. git-svn-id: https://develop.svn.wordpress.org/trunk@38843 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dad515b2a8
commit
993d6fb898
@ -14,10 +14,23 @@ class Tests_DB_Charset extends WP_UnitTestCase {
|
||||
*/
|
||||
protected static $_wpdb;
|
||||
|
||||
/**
|
||||
* The version of the MySQL server.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private static $server_info;
|
||||
|
||||
public static function setUpBeforeClass() {
|
||||
require_once( dirname( dirname( __FILE__ ) ) . '/db.php' );
|
||||
|
||||
self::$_wpdb = new wpdb_exposed_methods_for_testing();
|
||||
|
||||
if ( self::$_wpdb->use_mysqli ) {
|
||||
self::$server_info = mysqli_get_server_info( self::$_wpdb->dbh );
|
||||
} else {
|
||||
self::$server_info = mysql_get_server_info( self::$_wpdb->dbh );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -363,6 +376,10 @@ class Tests_DB_Charset extends WP_UnitTestCase {
|
||||
$this->markTestSkipped( "The current MySQL server doesn't support the utf8mb4 character set." );
|
||||
}
|
||||
|
||||
if ( 'big5' === $new_charset && 'byte' === $data[0]['length']['type'] && false !== strpos( self::$server_info, 'MariaDB' ) ) {
|
||||
$this->markTestSkipped( "MariaDB doesn't support this data set. See https://core.trac.wordpress.org/ticket/33171." );
|
||||
}
|
||||
|
||||
self::$_wpdb->charset = $new_charset;
|
||||
self::$_wpdb->set_charset( self::$_wpdb->dbh, $new_charset );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user