From ed374ae10eb77e810d65c71e5a3dcd2d1adb1d3e Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 1 Apr 2015 12:33:39 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/db/charset.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/tests/db/charset.php b/tests/phpunit/tests/db/charset.php index aacff2df68..6c886c378b 100755 --- a/tests/phpunit/tests/db/charset.php +++ b/tests/phpunit/tests/db/charset.php @@ -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 ); }