MediaWiki
master
|
Public Member Functions | |
testGeneralEncoding (array $data, $expect, array $params=[], array $options=[]) | |
provideGeneralEncoding More... | |
Static Public Member Functions | |
static | provideGeneralEncoding () |
Return general data to be encoded for testing. More... | |
Protected Member Functions | |
encodeData (array $params, array $data, $options=[]) | |
Get the formatter output for the given input data. More... | |
Protected Attributes | |
string | $printerName |
Name of the formatter being tested. More... | |
Definition at line 3 of file ApiFormatTestBase.php.
|
protected |
Get the formatter output for the given input data.
array | $params | Query parameters |
array | $data | Data to encode |
array | $options | Options. If passed a string, the string is treated as the 'class' option.
|
callable | null | $factory | Factory to use instead of the normal one |
Exception |
Definition at line 36 of file ApiFormatTestBase.php.
References $context, $options, $printerName, $ret, as, and null.
Referenced by testGeneralEncoding().
|
static |
Return general data to be encoded for testing.
BadMethodCallException |
Definition at line 16 of file ApiFormatTestBase.php.
References class.
ApiFormatTestBase::testGeneralEncoding | ( | array | $data, |
$expect, | |||
array | $params = [] , |
||
array | $options = [] |
||
) |
provideGeneralEncoding
array | $data | Data to be encoded |
string | Exception | $expect | String to expect, or exception expected to be thrown |
array | $params | Query parameters to set in the FauxRequest |
array | $options | Options to pass to self::encodeData() |
Definition at line 83 of file ApiFormatTestBase.php.
References $options, $params, and encodeData().
Referenced by ApiFormatRawTest\testFailWithHTTPError().
|
protected |
Name of the formatter being tested.
Definition at line 9 of file ApiFormatTestBase.php.
Referenced by encodeData().