WPDB: Due to PHP 5.2's internal string handling, strings in Windows are encoded using UTF-16, instead of UTF-8. With the addition of the many character set tests in [30345], a couple of them were tripping up in PHP 5.2 under Windows, because of this behaviour.

This marks those tests as skipped.

See #31262 for more discussion.



git-svn-id: https://develop.svn.wordpress.org/trunk@31953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2015-04-01 12:33:39 +00:00
parent 5f8c60d79d
commit ed374ae10e
1 changed files with 4 additions and 0 deletions

View File

@ -122,6 +122,10 @@ class Tests_DB_Charset extends WP_UnitTestCase {
* @ticket 21212
*/
function test_strip_invalid_text( $data, $expected, $message ) {
if ( version_compare( PHP_VERSION, '5.3', '<') && stristr( php_uname( 's' ), 'win' ) ) {
$this->markTestSkipped( 'This test fails in PHP 5.2 on Windows. See https://core.trac.wordpress.org/ticket/31262' );
}
$actual = self::$_wpdb->strip_invalid_text( $data );
$this->assertSame( $expected, $actual, $message );
}