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
*/
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 ) );