MediaWiki  1.23.8
ApiFormatJsonTest.php
Go to the documentation of this file.
1 <?php
2 
10 
11  public function testValidSyntax( ) {
12  $data = $this->apiRequest( 'json', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
13 
14  $this->assertInternalType( 'array', json_decode( $data, true ) );
15  $this->assertGreaterThan( 0, count( (array)$data ) );
16  }
17 
18  public function testJsonpInjection( ) {
19  $data = $this->apiRequest( 'json', array( 'action' => 'query', 'meta' => 'siteinfo', 'callback' => 'myCallback' ) );
20  $this->assertEquals( '/**/myCallback(', substr( $data, 0, 15 ) );
21  }
22 }
ApiFormatJsonTest\testJsonpInjection
testJsonpInjection()
Definition: ApiFormatJsonTest.php:18
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
ApiFormatTestBase\apiRequest
apiRequest( $format, $params, $data=null)
Definition: ApiFormatTestBase.php:12
ApiFormatJsonTest\testValidSyntax
testValidSyntax()
Definition: ApiFormatJsonTest.php:11
ApiFormatJsonTest
@group API @group Database @group medium @covers ApiFormatJson
Definition: ApiFormatJsonTest.php:9
ApiFormatTestBase
Definition: ApiFormatTestBase.php:3
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.