MediaWiki  REL1_24
StatusTest Class Reference
Inheritance diagram for StatusTest:
Collaboration diagram for StatusTest:

List of all members.

Public Member Functions

 testCanConstruct ()
 testCleanParams ($cleanCallback, $params, $expected)
 provideCleanParams Status::cleanParams
 testErrorWithMessage ($mockDetails)
 provideMockMessageDetails Status::error Status::getErrorsArray Status::getStatusArray
 testFatalWithMessage ($mockDetails)
 provideMockMessageDetails Status::fatal Status::getErrorsArray Status::getStatusArray
 testGetErrorMessage ()
 Status::getErrorMessage
 testGetErrorMessageArray ()
 Status::getErrorMessageArray
 testGetErrorsByType ()
 Status::getErrorsByType
 testGetHtml (Status $status, $wikitext, $html)
 provideGetWikiTextAndHtml Status::getHtml
 testGetMessage (Status $status, $expectedParams=array(), $expectedKey)
 provideGetMessage Status::getMessage
 testGetStatusArrayWithNonObjectMessages ($nonObjMsg)
 provideNonObjectMessages Status::getStatusArray
 testGetValue ()
 Status::getValue
 testGetWikiText (Status $status, $wikitext, $html)
 provideGetWikiTextAndHtml Status::getWikiText
 testHasMessage ()
 Status::hasMessage
 testIsGood ($ok, $errors, $expected)
 provideIsGood Status::isGood
 testIsOk ($ok)
 provideIsOk Status::isOk
 testMerge ()
 Status::merge
 testMergeWithOverwriteValue ()
 Status::merge
 testNewFatalWithMessage ()
 Status::newFatal
 testNewFatalWithString ()
 Status::newFatal
 testNewGood ($value=null)
 provideValues Status::newGood
 testReplaceMessage ()
 Status::replaceMessage
 testSetResult ($ok, $value=null)
 provideSetResult Status::setResult
 testWakeUpSanitizesCallback ()
 Status::__wakeup
 testWarningWithMessage ($mockDetails)
 provideMockMessageDetails Status::warning Status::getWarningsArray Status::getStatusArray

Static Public Member Functions

static provideCleanParams ()
static provideGetMessage ()
static provideGetWikiTextAndHtml ()
static provideIsGood ()
static provideIsOk ()
static provideMockMessageDetails ()
static provideNonObjectMessages ()
static provideSetResult ()
static provideValues ()

Protected Member Functions

 getMockMessage ($key= 'key', $params=array())
 getMockMessages ($messageDetails)

Detailed Description

Author:
Adam Shorland

Definition at line 6 of file StatusTest.php.


Member Function Documentation

StatusTest::getMockMessage ( key = 'key',
params = array() 
) [protected]

Definition at line 192 of file StatusTest.php.

References $key, and $params.

Referenced by getMockMessages(), testMerge(), and testMergeWithOverwriteValue().

StatusTest::getMockMessages ( messageDetails) [protected]
Parameters:
array$messageDetailsE.g. array( 'KEY' => array(/PARAMS/) )
Returns:
Message[]

Definition at line 209 of file StatusTest.php.

References $key, $messages, array(), as, and getMockMessage().

Referenced by testErrorWithMessage(), testFatalWithMessage(), and testWarningWithMessage().

static StatusTest::provideCleanParams ( ) [static]

Definition at line 288 of file StatusTest.php.

References $value, and array().

static StatusTest::provideGetMessage ( ) [static]
Returns:
array Array of arrays with values; 0 => status object 1 => expected Message parameters (with no context) 2 => expected Message key

Definition at line 399 of file StatusTest.php.

References array(), and Status\warning().

Returns:
array Array of arrays with values; 0 => status object 1 => expected string (with no context)

Definition at line 327 of file StatusTest.php.

References array().

static StatusTest::provideIsGood ( ) [static]

Definition at line 116 of file StatusTest.php.

References array().

static StatusTest::provideIsOk ( ) [static]

Definition at line 89 of file StatusTest.php.

References array().

Definition at line 217 of file StatusTest.php.

References array().

Definition at line 566 of file StatusTest.php.

References array().

static StatusTest::provideSetResult ( ) [static]

Definition at line 70 of file StatusTest.php.

References array().

static StatusTest::provideValues ( ) [static]

Definition at line 24 of file StatusTest.php.

References array().

Definition at line 8 of file StatusTest.php.

StatusTest::testCleanParams ( cleanCallback,
params,
expected 
)

provideCleanParams Status::cleanParams

Definition at line 279 of file StatusTest.php.

References $params.

provideMockMessageDetails Status::error Status::getErrorsArray Status::getStatusArray

Definition at line 153 of file StatusTest.php.

References $key, $messages, array(), as, and getMockMessages().

provideMockMessageDetails Status::fatal Status::getErrorsArray Status::getStatusArray

Definition at line 175 of file StatusTest.php.

References $key, $messages, array(), as, and getMockMessages().

StatusTest::testGetHtml ( Status status,
wikitext,
html 
)

provideGetWikiTextAndHtml Status::getHtml

Todo:
test long and short context messages generated through this method this can not really be done now due to use of $this->getWikiText using wfMessage()->plain().

It is possible to mock such methods but only if namespaces are used.

Definition at line 318 of file StatusTest.php.

References $html, and Status\getHTML().

StatusTest::testGetMessage ( Status status,
expectedParams = array(),
expectedKey 
)

provideGetMessage Status::getMessage

Todo:
test long and short context messages generated through this method

Definition at line 386 of file StatusTest.php.

References Status\getMessage().

provideNonObjectMessages Status::getStatusArray

Definition at line 552 of file StatusTest.php.

References Status\getWarningsArray(), and Status\warning().

StatusTest::testGetWikiText ( Status status,
wikitext,
html 
)

provideGetWikiTextAndHtml Status::getWikiText

Todo:
test long and short context messages generated through this method this can not really be done now due to use of wfMessage()->plain() It is possible to mock such methods but only if namespaces are used

Definition at line 306 of file StatusTest.php.

References Status\getWikiText().

Status::hasMessage

Definition at line 265 of file StatusTest.php.

References wfMessage().

StatusTest::testIsGood ( ok,
errors,
expected 
)

provideIsGood Status::isGood

Definition at line 109 of file StatusTest.php.

References $ok.

provideIsOk Status::isOk

Definition at line 83 of file StatusTest.php.

References $ok.

Status::merge

Definition at line 227 of file StatusTest.php.

References getMockMessage().

StatusTest::testNewGood ( value = null)

provideValues Status::newGood

Definition at line 17 of file StatusTest.php.

References $value, and Status\newGood().

StatusTest::testSetResult ( ok,
value = null 
)

provideSetResult Status::setResult

Definition at line 63 of file StatusTest.php.

References $ok, and $value.

provideMockMessageDetails Status::warning Status::getWarningsArray Status::getStatusArray

Definition at line 131 of file StatusTest.php.

References $key, $messages, array(), as, and getMockMessages().


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