From: umherirrender Date: Wed, 10 Dec 2014 20:09:36 +0000 (+0100) Subject: Fix check for function wddx_deserialize in tests for hhvm X-Git-Tag: 1.31.0-rc.0~13003 X-Git-Url: http://git.cyclocoop.org/%27%20.generer_url_ecrire%28_request%28%27exec%27%29%2C%27cmd=switch&outil=rss_couteau_suisse%27%29.%27?a=commitdiff_plain;h=be3f554c956b179fb5b4c8bd18d619be51f38171;p=lhc%2Fweb%2Fwiklou.git Fix check for function wddx_deserialize in tests for hhvm The @requires just works for other tests, not for php functions. This fixed a failure for the hhvm test server: 1) ApiFormatWddxTest::testValidSyntax Failed asserting that null is of type "array". Change-Id: Iadd8238ce62d4803cdf56508886ad016f8ac8f1d --- diff --git a/tests/phpunit/includes/api/format/ApiFormatWddxTest.php b/tests/phpunit/includes/api/format/ApiFormatWddxTest.php index d075f5477d..51708561ae 100644 --- a/tests/phpunit/includes/api/format/ApiFormatWddxTest.php +++ b/tests/phpunit/includes/api/format/ApiFormatWddxTest.php @@ -8,10 +8,11 @@ */ class ApiFormatWddxTest extends ApiFormatTestBase { - /** - * @requires function wddx_deserialize - */ public function testValidSyntax( ) { + if ( !function_exists( 'wddx_deserialize' ) ) { + $this->markTestSkipped( "Function 'wddx_deserialize' not exist, skipping." ); + } + $data = $this->apiRequest( 'wddx', array( 'action' => 'query', 'meta' => 'siteinfo' ) ); $this->assertInternalType( 'array', wddx_deserialize( $data ) );