Ticket #33171: 33171.patch
File 33171.patch, 1.3 KB (added by , 9 years ago) |
---|
-
tests/phpunit/tests/db/charset.php
14 14 */ 15 15 protected static $_wpdb; 16 16 17 /** 18 * The version of the MySQL server. 19 * @var string 20 */ 21 private static $server_info; 22 17 23 public static function setUpBeforeClass() { 18 24 require_once( dirname( dirname( __FILE__ ) ) . '/db.php' ); 19 25 20 26 self::$_wpdb = new wpdb_exposed_methods_for_testing(); 27 28 if ( self::$_wpdb->use_mysqli ) { 29 self::$server_info = mysqli_get_server_info( self::$_wpdb->dbh ); 30 } else { 31 self::$server_info = mysql_get_server_info( self::$_wpdb->dbh ); 32 } 21 33 } 22 34 23 35 /** … … 362 374 if ( 'utf8mb4' === $new_charset && ! self::$_wpdb->has_cap( 'utf8mb4' ) ) { 363 375 $this->markTestSkipped( "The current MySQL server doesn't support the utf8mb4 character set." ); 364 376 } 377 378 if ( 'big5' === $new_charset && 'byte' === $data[0]['length']['type'] && false !== strpos( self::$server_info, 'MariaDB' ) ) { 379 $this->markTestSkipped( "MariaDB doesn't support this data set, see https://core.trac.wordpress.org/ticket/33171." ); 380 } 365 381 366 382 self::$_wpdb->charset = $new_charset; 367 383 self::$_wpdb->set_charset( self::$_wpdb->dbh, $new_charset );