c00545f8ebe032a3047aaafde46f240d3b428a52
7 * @covers ApiFormatWddx
9 class ApiFormatWddxTest
extends ApiFormatTestBase
{
11 public function testValidSyntax( ) {
12 if ( !function_exists( 'wddx_deserialize' ) ) {
13 $this->markTestSkipped( "Function 'wddx_deserialize' not exist, skipping." );
16 if ( wfIsHHVM() && false === strpos( wddx_serialize_value( "Test for &" ), '&' ) ) {
17 # Some version of HHVM fails to escape the ampersand
19 # https://phabricator.wikimedia.org/T75531
20 $this->markTestSkipped( "wddx_deserialize is bugged under this version of HHVM" );
23 $data = $this->apiRequest( 'wddx', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
25 $this->assertInternalType( 'array', wddx_deserialize( $data ) );
26 $this->assertGreaterThan( 0, count( (array)$data ) );