MediaWiki  master
ApiFormatBaseTest Class Reference

API ApiFormatBase. More...

Inheritance diagram for ApiFormatBaseTest:
Collaboration diagram for ApiFormatBaseTest:

Public Member Functions

 getMockFormatter (ApiMain $main=null, $format, $methods=[])
 
 testApiFrameOptions ()
 
 testBasics ()
 
 testDisable ()
 
 testFilenameEncoding ( $filename, $expect)
 provideFilenameEncoding More...
 
 testForceDefaultParams ()
 
 testGetAllowedParams ()
 
 testGetExamplesMessages ()
 
 testHtmlHeader ( $post, $registerNonHtml, $expect)
 provideHtmlHeader More...
 
 testNullMimeType ()
 
- Public Member Functions inherited from ApiFormatTestBase
 testGeneralEncoding (array $data, $expect, array $params=[], array $options=[])
 provideGeneralEncoding More...
 

Static Public Member Functions

static provideFilenameEncoding ()
 
static provideGeneralEncoding ()
 
static provideHtmlHeader ()
 
- Static Public Member Functions inherited from ApiFormatTestBase
static provideGeneralEncoding ()
 Return general data to be encoded for testing. More...
 

Protected Member Functions

 encodeData (array $params, array $data, $options=[])
 
 setUp ()
 
- Protected Member Functions inherited from ApiFormatTestBase
 encodeData (array $params, array $data, $options=[])
 Get the formatter output for the given input data. More...
 

Protected Attributes

 $printerName = 'mockbase'
 
- Protected Attributes inherited from ApiFormatTestBase
string $printerName
 Name of the formatter being tested. More...
 

Detailed Description

API ApiFormatBase.

Definition at line 9 of file ApiFormatBaseTest.php.

Member Function Documentation

◆ encodeData()

ApiFormatBaseTest::encodeData ( array  $params,
array  $data,
  $options = [] 
)
protected

Definition at line 37 of file ApiFormatBaseTest.php.

References $file, $options, $response, $ret, class, getMockFormatter(), null, and use.

◆ getMockFormatter()

ApiFormatBaseTest::getMockFormatter ( ApiMain  $main = null,
  $format,
  $methods = [] 
)

◆ provideFilenameEncoding()

static ApiFormatBaseTest::provideFilenameEncoding ( )
static

Definition at line 173 of file ApiFormatBaseTest.php.

◆ provideGeneralEncoding()

static ApiFormatBaseTest::provideGeneralEncoding ( )
static

Definition at line 98 of file ApiFormatBaseTest.php.

◆ provideHtmlHeader()

static ApiFormatBaseTest::provideHtmlHeader ( )
static

Definition at line 385 of file ApiFormatBaseTest.php.

◆ setUp()

ApiFormatBaseTest::setUp ( )
protected

Definition at line 13 of file ApiFormatBaseTest.php.

◆ testApiFrameOptions()

ApiFormatBaseTest::testApiFrameOptions ( )

Definition at line 277 of file ApiFormatBaseTest.php.

References getMockFormatter(), and null.

◆ testBasics()

ApiFormatBaseTest::testBasics ( )

Definition at line 197 of file ApiFormatBaseTest.php.

References getMockFormatter(), and null.

◆ testDisable()

ApiFormatBaseTest::testDisable ( )

Definition at line 206 of file ApiFormatBaseTest.php.

References $response, getMockFormatter(), null, and use.

◆ testFilenameEncoding()

ApiFormatBaseTest::testFilenameEncoding (   $filename,
  $expect 
)

provideFilenameEncoding

Definition at line 157 of file ApiFormatBaseTest.php.

References $response, $ret, class, getMockFormatter(), and use.

◆ testForceDefaultParams()

ApiFormatBaseTest::testForceDefaultParams ( )

Definition at line 302 of file ApiFormatBaseTest.php.

References $context, getMockFormatter(), null, and ApiBase\PARAM_DFLT.

◆ testGetAllowedParams()

ApiFormatBaseTest::testGetAllowedParams ( )

◆ testGetExamplesMessages()

ApiFormatBaseTest::testGetExamplesMessages ( )

Definition at line 342 of file ApiFormatBaseTest.php.

References getMockFormatter(), and null.

◆ testHtmlHeader()

ApiFormatBaseTest::testHtmlHeader (   $post,
  $registerNonHtml,
  $expect 
)

provideHtmlHeader

Definition at line 359 of file ApiFormatBaseTest.php.

References $context, $request, class, and getMockFormatter().

◆ testNullMimeType()

ApiFormatBaseTest::testNullMimeType ( )

Definition at line 232 of file ApiFormatBaseTest.php.

References $response, getMockFormatter(), null, and use.

Member Data Documentation

◆ $printerName

ApiFormatBaseTest::$printerName = 'mockbase'
protected

Definition at line 11 of file ApiFormatBaseTest.php.


The documentation for this class was generated from the following file: