MediaWiki  1.23.6
ApiMainTest.php
Go to the documentation of this file.
1 <?php
2 
10 class ApiMainTest extends ApiTestCase {
11 
18  public function testApi() {
19  $api = new ApiMain(
20  new FauxRequest( array( 'action' => 'help', 'format' => 'xml' ) )
21  );
22  $api->execute();
23  $api->getPrinter()->setBufferResult( true );
24  $api->printResult( false );
25  $resp = $api->getPrinter()->getBuffer();
26 
27  libxml_use_internal_errors( true );
28  $sxe = simplexml_load_string( $resp );
29  $this->assertNotInternalType( "bool", $sxe );
30  $this->assertThat( $sxe, $this->isInstanceOf( "SimpleXMLElement" ) );
31  }
32 
33 }
ApiMain
This is the main API class, used for both external and internal processing.
Definition: ApiMain.php:41
FauxRequest
WebRequest clone which takes values from a provided array.
Definition: WebRequest.php:1275
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
ApiMainTest\testApi
testApi()
Test that the API will accept a FauxRequest and execute.
Definition: ApiMainTest.php:18
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
ApiMainTest
@group API @group Database @group medium
Definition: ApiMainTest.php:10
ApiTestCase
Definition: ApiTestCase.php:3