From: Brad Jorsch Date: Tue, 16 Dec 2014 16:52:52 +0000 (-0500) Subject: Skip ApiFormatWddxTest under HHVM X-Git-Tag: 1.31.0-rc.0~12923^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=82fb7347408567681d3eb9b16d7813ff6fa21579;p=lhc%2Fweb%2Fwiklou.git Skip ApiFormatWddxTest under HHVM wddx_serialize_value() fails to escape the ampersand under HHVM. It has been fixed upstream https://github.com/facebook/hhvm/issues/4283 but has not been released yet. When running under HHVM and detecting the ampersand is not escaped, skip the test.. Bug: T75531 Change-Id: Ia58ec20b4daf78cd90da1bdf8af6cac86015c5d7 --- diff --git a/tests/phpunit/includes/api/format/ApiFormatWddxTest.php b/tests/phpunit/includes/api/format/ApiFormatWddxTest.php index 51708561ae..c00545f8eb 100644 --- a/tests/phpunit/includes/api/format/ApiFormatWddxTest.php +++ b/tests/phpunit/includes/api/format/ApiFormatWddxTest.php @@ -13,6 +13,13 @@ class ApiFormatWddxTest extends ApiFormatTestBase { $this->markTestSkipped( "Function 'wddx_deserialize' not exist, skipping." ); } + if ( wfIsHHVM() && false === strpos( wddx_serialize_value( "Test for &" ), '&' ) ) { + # Some version of HHVM fails to escape the ampersand + # + # https://phabricator.wikimedia.org/T75531 + $this->markTestSkipped( "wddx_deserialize is bugged under this version of HHVM" ); + } + $data = $this->apiRequest( 'wddx', array( 'action' => 'query', 'meta' => 'siteinfo' ) ); $this->assertInternalType( 'array', wddx_deserialize( $data ) );