} elseif ( isset( $opts['comment'] ) ) {
$out = Linker::formatComment( $input, $title, $local );
} elseif ( isset( $opts['preload'] ) ) {
- $out = $parser->getpreloadText( $input, $title, $options );
+ $out = $parser->getPreloadText( $input, $title, $options );
} else {
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
$out = $output->getText();
$this->assertEquals(
array( NS_MAIN ),
- MWNamespace::getcontentNamespaces(),
+ MWNamespace::getContentNamespaces(),
'$wgContentNamespaces is an array with only NS_MAIN by default'
);
# test !is_array( $wgcontentNamespaces )
$wgContentNamespaces = '';
- $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
+ $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() );
$wgContentNamespaces = false;
- $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
+ $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() );
$wgContentNamespaces = null;
- $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
+ $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() );
$wgContentNamespaces = 5;
- $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
+ $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() );
# test $wgContentNamespaces === array()
$wgContentNamespaces = array();
- $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
+ $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() );
# test !in_array( NS_MAIN, $wgContentNamespaces )
$wgContentNamespaces = array( NS_USER, NS_CATEGORY );
$this->assertEquals(
array( NS_MAIN, NS_USER, NS_CATEGORY ),
- MWNamespace::getcontentNamespaces(),
+ MWNamespace::getContentNamespaces(),
'NS_MAIN is forced in $wgContentNamespaces even if unwanted'
);
$wgContentNamespaces = array( NS_MAIN );
$this->assertEquals(
array( NS_MAIN ),
- MWNamespace::getcontentNamespaces()
+ MWNamespace::getContentNamespaces()
);
$wgContentNamespaces = array( NS_MAIN, NS_USER, NS_CATEGORY );
$this->assertEquals(
array( NS_MAIN, NS_USER, NS_CATEGORY ),
- MWNamespace::getcontentNamespaces()
+ MWNamespace::getContentNamespaces()
);
}
*/
class ApiEditPageTest extends ApiTestCase {
- public function setup() {
+ public function setUp() {
global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang;
- parent::setup();
+ parent::setUp();
$wgExtraNamespaces[12312] = 'Dummy';
$wgExtraNamespaces[12313] = 'Dummy_talk';
$this->doLogin();
}
- public function teardown() {
+ public function tearDown() {
global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang;
unset( $wgExtraNamespaces[12312] );
MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache
$wgContLang->resetNamespaces(); # reset namespace cache
- parent::teardown();
+ parent::tearDown();
}
function testEdit() {
} elseif ( isset( $opts['comment'] ) ) {
$out = Linker::formatComment( $input, $title, $local );
} elseif ( isset( $opts['preload'] ) ) {
- $out = $parser->getpreloadText( $input, $title, $options );
+ $out = $parser->getPreloadText( $input, $title, $options );
} else {
$output = $parser->parse( $input, $title, $options, true, true, 1337 );
$out = $output->getText();