Make WordPress Core

Changeset 38843


Ignore:
Timestamp:
10/20/2016 06:29:28 PM (8 years ago)
Author:
boonebgorges
Message:

Tests: Skip strip_invalid_text() test for big5 charset on MariaDB.

MariaDB doesn't support the tested configuration.

Props ocean90.
Fixes #33171.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/db/charset.php

    r38382 r38843  
    1515    protected static $_wpdb;
    1616
     17    /**
     18     * The version of the MySQL server.
     19     *
     20     * @var string
     21     */
     22    private static $server_info;
     23
    1724    public static function setUpBeforeClass() {
    1825        require_once( dirname( dirname( __FILE__ ) ) . '/db.php' );
    1926
    2027        self::$_wpdb = new wpdb_exposed_methods_for_testing();
     28
     29        if ( self::$_wpdb->use_mysqli ) {
     30            self::$server_info = mysqli_get_server_info( self::$_wpdb->dbh );
     31        } else {
     32            self::$server_info = mysql_get_server_info( self::$_wpdb->dbh );
     33        }
    2134    }
    2235
     
    362375        if ( 'utf8mb4' === $new_charset && ! self::$_wpdb->has_cap( 'utf8mb4' ) ) {
    363376            $this->markTestSkipped( "The current MySQL server doesn't support the utf8mb4 character set." );
     377        }
     378
     379        if ( 'big5' === $new_charset && 'byte' === $data[0]['length']['type'] && false !== strpos( self::$server_info, 'MariaDB' ) ) {
     380            $this->markTestSkipped( "MariaDB doesn't support this data set. See https://core.trac.wordpress.org/ticket/33171." );
    364381        }
    365382
Note: See TracChangeset for help on using the changeset viewer.