Tests: When testing the utf8mb4 charset, ensure that the current MySQL server has utf8mb4 support.

See #35249.



git-svn-id: https://develop.svn.wordpress.org/trunk@36116 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2015-12-29 04:39:02 +00:00
parent 61ff693ff0
commit f46c0a637b

View File

@ -359,6 +359,10 @@ class Tests_DB_Charset extends WP_UnitTestCase {
$new_charset = $data[0]['charset'];
}
if ( 'utf8mb4' === $new_charset && ! self::$_wpdb->has_cap( 'utf8mb4' ) ) {
$this->markTestSkipped( "The current MySQL server doesn't support the utf8mb4 character set." );
}
self::$_wpdb->charset = $new_charset;
self::$_wpdb->set_charset( self::$_wpdb->dbh, $new_charset );