Adds tests for Json and wddx formats Add @covers tags Fixes some comments Fixes scope Change-Id: I5f22097ddcaeb917f856ba7aa0cb793caa17925e
17 lines
402 B
PHP
17 lines
402 B
PHP
<?php
|
|
|
|
/**
|
|
* @group API
|
|
* @group Database
|
|
* @group medium
|
|
* @covers ApiFormatJson
|
|
*/
|
|
class ApiFormatJsonTest extends ApiFormatTestBase {
|
|
|
|
public function testValidSyntax( ) {
|
|
$data = $this->apiRequest( 'json', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
|
|
|
|
$this->assertInternalType( 'array', json_decode( $data, true ) );
|
|
$this->assertGreaterThan( 0, count( (array)$data ) );
|
|
}
|
|
}
|