MediaWiki
master
|
TestCase for FetchText. More...
Public Member Functions | |
addDBData () | |
Stub. | |
testCharacters () | |
testEmpty () | |
testExistingSeveral () | |
testExistingSimple () | |
testExistingSimpleWithNewline () | |
testFloatingPointNumberExisting () | |
testFloatingPointNumberNonExisting () | |
testMix () | |
testNegativeInteger () | |
testNonExisting () | |
Protected Member Functions | |
setUp () | |
setUp and tearDown should (where significant) happen in reverse order. | |
Private Member Functions | |
addRevision ($page, $text, $summary) | |
Adds a revision to a page, while returning the resuting text's id. | |
assertFilter ($input, $expectedOutput) | |
Helper to relate FetchText's input and output. | |
Private Attributes | |
Exception null | $exceptionFromAddDBData |
As the current MediaWikiTestCase::run is not robust enough to recover from thrown exceptions directly, we cannot throw frow within addDBData, although it would be appropriate. | |
FetchText | $fetchText |
the (mocked) FetchText that is to test | |
$textId1 | |
$textId2 | |
$textId3 | |
$textId4 | |
$textId5 |
Stub.
If a test needs to add additional data to the database, it should implement this method and do so
Reimplemented from MediaWikiTestCase.
Definition at line 122 of file fetchTextTest.php.
FetchTextTest::addRevision | ( | $ | page, |
$ | text, | ||
$ | summary | ||
) | [private] |
Adds a revision to a page, while returning the resuting text's id.
$page | WikiPage The page to add the revision to |
$text | String The revisions text |
$text | String The revisions summare |
MWExcepion |
Definition at line 108 of file fetchTextTest.php.
FetchTextTest::assertFilter | ( | $ | input, |
$ | expectedOutput | ||
) | [private] |
Helper to relate FetchText's input and output.
Definition at line 163 of file fetchTextTest.php.
References $input.
Referenced by testCharacters(), testExistingSeveral(), testExistingSimpleWithNewline(), testFloatingPointNumberExisting(), testMix(), testNegativeInteger(), and testNonExisting().
FetchTextTest::setUp | ( | ) | [protected] |
setUp and tearDown should (where significant) happen in reverse order.
Reimplemented from MediaWikiTestCase.
Definition at line 148 of file fetchTextTest.php.
Definition at line 223 of file fetchTextTest.php.
References assertFilter().
Definition at line 200 of file fetchTextTest.php.
Definition at line 188 of file fetchTextTest.php.
References assertFilter().
Definition at line 178 of file fetchTextTest.php.
Definition at line 183 of file fetchTextTest.php.
References assertFilter().
Definition at line 212 of file fetchTextTest.php.
References assertFilter().
Definition at line 218 of file fetchTextTest.php.
Definition at line 227 of file fetchTextTest.php.
References assertFilter().
Definition at line 208 of file fetchTextTest.php.
References assertFilter().
Definition at line 204 of file fetchTextTest.php.
References assertFilter().
Exception null FetchTextTest::$exceptionFromAddDBData [private] |
As the current MediaWikiTestCase::run is not robust enough to recover from thrown exceptions directly, we cannot throw frow within addDBData, although it would be appropriate.
Hence, we catch the exception and store it until we are in setUp and may finally rethrow the exception without crashing the test suite.
Definition at line 93 of file fetchTextTest.php.
FetchText FetchTextTest::$fetchText [private] |
the (mocked) FetchText that is to test
Definition at line 97 of file fetchTextTest.php.
FetchTextTest::$textId1 [private] |
Definition at line 80 of file fetchTextTest.php.
FetchTextTest::$textId2 [private] |
Definition at line 81 of file fetchTextTest.php.
FetchTextTest::$textId3 [private] |
Definition at line 82 of file fetchTextTest.php.
FetchTextTest::$textId4 [private] |
Definition at line 83 of file fetchTextTest.php.
FetchTextTest::$textId5 [private] |
Definition at line 84 of file fetchTextTest.php.