Go to the documentation of this file.
8 protected function setUp() {
18 'wgLanguageCode' =>
'en',
38 $this->assertInstanceOf(
'Title',
$title,
"Title creation" );
39 $this->assertEquals(
"Text",
$title,
"Automatic string conversion" );
42 $this->assertEquals(
"Media:Text",
$title,
"Title creation with namespace" );
52 array(
'Text',
null,
'Text' ),
53 array(
'text',
null,
'Text' ),
65 $this->assertEquals( $text,
"$title",
"see if '$titleName' matches '$text'" );
70 $this->assertEquals(
"Main Page",
"$title",
"Test initial creation of a title" );
92 $this->assertTrue(
$title->isLocal() );
101 $this->assertEquals(
"Test",
$title->isLocal() );
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
testTitleObjectStringConversion()
Name tests so that PHPUnit can turn them into sentences when they run.
static newMainPage()
Create a new Title for the Main Page.
testTitleObjectFromObject()
@expectedException MWException object See http://www.phpunit.de/manual/3.4/en/appendixes....
provideTitles()
If you want to run a the same test with a variety of data, use a data provider.
testCheckMainPageTitleIsConsideredLocal( $title)
Instead of putting a bunch of tests in a single test method, you should put only one or two tests in ...
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
tearDown()
Anything cleanup you need to do should go here.
presenting them properly to the user as errors is done by the caller $title
testCreateBasicListOfTitles( $titleName, $ns, $text)
@dataProvider provideTitles See http://www.phpunit.de/manual/3.4/en/appendixes.annotations....
setUp()
Anything that needs to happen before your tests should go here.
testSetUpMainPageTitleForNextTest()
static factory( $code)
Get a cached or new language object for a given language code.