MediaWiki  master
ApiErrorFormatterTest Class Reference

API. More...

Inheritance diagram for ApiErrorFormatterTest:
Collaboration diagram for ApiErrorFormatterTest:

Public Member Functions

 testAddMessagesFromStatus_filter ()
 ApiErrorFormatter::addMessagesFromStatus ApiErrorFormatter::addWarningOrError ApiErrorFormatter::formatMessageInternal. More...
 
 testErrorFormatter ( $format, $lang, $useDB, $expect1, $expect2, $expect3)
 ApiErrorFormatter provideErrorFormatter. More...
 
 testErrorFormatterBasics ()
 ApiErrorFormatter. More...
 
 testErrorFormatterBC ()
 ApiErrorFormatter_BackCompat. More...
 
 testGetMessageFromException ( $exception, $options, $expect)
 provideGetMessageFromException ApiErrorFormatter::getMessageFromException ApiErrorFormatter::formatException More...
 
 testGetMessageFromException_BC ( $exception, $options, $expect)
 provideGetMessageFromException ApiErrorFormatter_BackCompat::formatException More...
 
 testIsValidApiCode ( $code, $expect)
 provideIsValidApiCode ApiErrorFormatter::isValidApiCode More...
 
 testNewWithFormat ()
 ApiErrorFormatter ApiErrorFormatter_BackCompat. More...
 

Static Public Member Functions

static provideErrorFormatter ()
 
static provideGetMessageFromException ()
 
static provideIsValidApiCode ()
 

Private Member Functions

 removeModuleTag ( $s)
 

Additional Inherited Members

- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()
 

Detailed Description

API.

Definition at line 8 of file ApiErrorFormatterTest.php.

Member Function Documentation

◆ provideErrorFormatter()

static ApiErrorFormatterTest::provideErrorFormatter ( )
static

◆ provideGetMessageFromException()

static ApiErrorFormatterTest::provideGetMessageFromException ( )
static

Definition at line 594 of file ApiErrorFormatterTest.php.

◆ provideIsValidApiCode()

static ApiErrorFormatterTest::provideIsValidApiCode ( )
static

Definition at line 686 of file ApiErrorFormatterTest.php.

References false, and true.

◆ removeModuleTag()

ApiErrorFormatterTest::removeModuleTag (   $s)
private

Definition at line 118 of file ApiErrorFormatterTest.php.

References $s.

Referenced by testErrorFormatter().

◆ testAddMessagesFromStatus_filter()

◆ testErrorFormatter()

ApiErrorFormatterTest::testErrorFormatter (   $format,
  $lang,
  $useDB,
  $expect1,
  $expect2,
  $expect3 
)

◆ testErrorFormatterBasics()

ApiErrorFormatterTest::testErrorFormatterBasics ( )

◆ testErrorFormatterBC()

◆ testGetMessageFromException()

ApiErrorFormatterTest::testGetMessageFromException (   $exception,
  $options,
  $expect 
)

provideGetMessageFromException ApiErrorFormatter::getMessageFromException ApiErrorFormatter::formatException

Parameters
Exception$exception
array$options
array$expect

Definition at line 549 of file ApiErrorFormatterTest.php.

References $options, class, and Language\factory().

◆ testGetMessageFromException_BC()

ApiErrorFormatterTest::testGetMessageFromException_BC (   $exception,
  $options,
  $expect 
)

provideGetMessageFromException ApiErrorFormatter_BackCompat::formatException

Parameters
Exception$exception
array$options
array$expect

Definition at line 574 of file ApiErrorFormatterTest.php.

References $options, and class.

◆ testIsValidApiCode()

ApiErrorFormatterTest::testIsValidApiCode (   $code,
  $expect 
)

provideIsValidApiCode ApiErrorFormatter::isValidApiCode

Parameters
string$code
bool$expect

Definition at line 682 of file ApiErrorFormatterTest.php.

References $code, and ApiErrorFormatter\isValidApiCode().

◆ testNewWithFormat()

ApiErrorFormatterTest::testNewWithFormat ( )

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