MediaWiki
REL1_24
|
Public Member Functions | |
testCheckMainPageTitleIsConsideredLocal ($title) | |
Instead of putting a bunch of tests in a single test method, you should put only one or two tests in each test method. | |
testCreateBasicListOfTitles ($titleName, $ns, $text) | |
provideTitles Ignore long line warning See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider | |
testSetUpMainPageTitleForNextTest () | |
testTitleObjectFromObject () | |
MWException object See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.expectedException | |
testTitleObjectStringConversion () | |
Name tests so that PHPUnit can turn them into sentences when they run. | |
Static Public Member Functions | |
static | provideTitles () |
If you want to run a the same test with a variety of data, use a data provider. | |
Protected Member Functions | |
setUp () | |
Anything that needs to happen before your tests should go here. | |
tearDown () | |
Anything cleanup you need to do should go here. |
Definition at line 3 of file SampleTest.php.
static TestSample::provideTitles | ( | ) | [static] |
If you want to run a the same test with a variety of data, use a data provider.
see: http://www.phpunit.de/manual/3.4/en/writing-tests-for-phpunit.html
Definition at line 50 of file SampleTest.php.
References array().
TestSample::setUp | ( | ) | [protected] |
Anything that needs to happen before your tests should go here.
Reimplemented from MediaWikiLangTestCase.
Definition at line 8 of file SampleTest.php.
References array(), Language\factory(), and MediaWikiTestCase\setMwGlobals().
TestSample::tearDown | ( | ) | [protected] |
Anything cleanup you need to do should go here.
Reimplemented from MediaWikiTestCase.
Definition at line 26 of file SampleTest.php.
Instead of putting a bunch of tests in a single test method, you should put only one or two tests in each test method.
This way, the test method names can remain descriptive.
If you want to make tests depend on data created in another method, you can create dependencies feed whatever you return from the dependant method (e.g. testInitialCreation in this example) as arguments to the next method (e.g. $title in testTitleDepends is whatever testInitialCreatiion returned.) testSetUpMainPageTitleForNextTest See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.depends
Definition at line 94 of file SampleTest.php.
References $title.
TestSample::testCreateBasicListOfTitles | ( | $ | titleName, |
$ | ns, | ||
$ | text | ||
) |
provideTitles Ignore long line warning See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider
Definition at line 66 of file SampleTest.php.
References $title, and Title\newFromText().
Definition at line 71 of file SampleTest.php.
References $title, and Title\newMainPage().
MWException object See http://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.expectedException
Definition at line 104 of file SampleTest.php.
References $title, and Title\newFromText().
Name tests so that PHPUnit can turn them into sentences when they run.
While MediaWiki isn't strictly an Agile Programming project, you are encouraged to use the naming described under "Agile Documentation" at http://www.phpunit.de/manual/3.4/en/other-uses-for-tests.html
Definition at line 37 of file SampleTest.php.
References $title, and Title\newFromText().