/** creates a title object and its article object */
protected function setUp() {
+ parent::setUp();
$this->title = Title::makeTitle( NS_MAIN, 'SomePage' );
$this->article = new Article( $this->title );
-
}
/** cleanup title object and its article object */
protected function tearDown() {
+ parent::tearDown();
$this->title = null;
$this->article = null;
-
}
function testImplementsGetMagic() {
class CdbTest extends MediaWikiTestCase {
protected function setUp() {
+ parent::setUp();
if ( !CdbReader::haveExtension() ) {
$this->markTestSkipped( 'Native CDB support is not available' );
}
var $response;
protected function setUp() {
+ parent::setUp();
$this->response = new FauxResponse;
}
* with.
*/
protected function setUp() {
+ parent::setUp();
$this->object = new FormOptionsExposed();
-
}
public function testAddStringOption() {
protected $object;
/**
- * Instanciates a FormOptions object to play with.
+ * Instanciates a FormOptions object to play with.
* FormOptions::add() is tested by the class FormOptionsInitializationTest
* so we assume the function is well tested already an use it to create
* the fixture.
*/
protected function setUp() {
+ parent::setUp();
$this->object = new FormOptions;
$this->object->add( 'string1', 'string one' );
$this->object->add( 'string2', 'string two' );
}
protected function setUp() {
+ parent::setUp();
$dbw = wfGetDB( DB_MASTER );
$dbw->replace(
'interwiki',
class PathRouterTest extends MediaWikiTestCase {
protected function setUp() {
+ parent::setUp();
$router = new PathRouter;
$router->add("/wiki/$1");
$this->basicRouter = $router;
public function setUp() {
global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang;
+ parent::setUp();
+
$wgExtraNamespaces[ 12312 ] = 'Dummy';
$wgExtraNamespaces[ 12313 ] = 'Dummy_talk';
public function tearDown() {
global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang;
+ parent::tearDown();
+
unset( $wgExtraNamespaces[ 12312 ] );
unset( $wgExtraNamespaces[ 12313 ] );
var $mConf;
protected function setUp() {
+ parent::setUp();
+
$this->mConf = new SiteConfiguration;
$this->mConf->suffixes = array( 'wiki' );
$GLOBALS['global'] = array( 'global' => 'global' );
}
-
function testSiteFromDb() {
$this->assertEquals(
array( 'wikipedia', 'en' ),
public function setup() {
global $wgUser;
+ parent::setUp();
+
// anon user
$wgUser = new User();
$wgUser->setName( '127.0.0.1' );
public function setup() {
global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContLang;
+ parent::setUp();
+
$this->mergeMwGlobalArrayValue(
'wgExtraNamespaces',
array(
public function teardown() {
global $wgContLang;
+ parent::tearDown();
+
MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache
$wgContLang->resetNamespaces(); # reset namespace cache
}
var $handler;
public function setup() {
+ parent::setUp();
$this->handler = ContentHandler::getForModelID( CONTENT_MODEL_WIKITEXT );
}
- public function teardown() {
- }
-
public function testSerializeContent( ) {
$content = new WikitextContent( 'hello world' );
protected $select;
protected function setUp() {
+ parent::setUp();
$this->select = new XmlSelect();
}
protected function tearDown() {
+ parent::tearDown();
$this->select = null;
}
var $zipDir, $entries;
protected function setUp() {
+ parent::setUp();
$this->zipDir = __DIR__ . '/../data/zip';
}
var $db, $functionTest = false;
protected function setUp() {
+ parent::setUp();
$this->db = wfGetDB( DB_MASTER );
}
protected function tearDown() {
+ parent::tearDown();
if ( $this->functionTest ) {
$this->dropFunctions();
$this->functionTest = false;
protected function setUp() {
+ parent::setUp();
// Make sure MWDebug class is enabled
static $MWDebugEnabled = false;
if( !$MWDebugEnabled ) {
protected function tearDown() {
wfRestoreWarnings();
+ parent::tearDown();
}
function testAddLog() {
class PNGMetadataExtractorTest extends MediaWikiTestCase {
protected function setUp() {
+ parent::setUp();
$this->filePath = __DIR__ . '/../../data/media/';
}
/**
class SVGMetadataExtractorTest extends MediaWikiTestCase {
protected function setUp() {
+ parent::setUp();
AutoLoader::loadClass( 'SVGMetadataExtractorTest' );
}
class XMPTest extends MediaWikiTestCase {
protected function setUp() {
+ parent::setUp();
if ( !wfDl( 'xml' ) ) {
$this->markTestSkipped( 'Requires libxml to do XMP parsing' );
}
private $title;
protected function setUp() {
+ parent::setUp();
+
$this->testParserOptions = new ParserOptions();
$this->testParser = new Parser();
}
protected function tearDown() {
+ parent::tearDown();
+
unset( $this->testParser );
unset( $this->title );
}
protected function setUp() {
global $wgParserConf;
+ parent::setUp();
$this->mOptions = new ParserOptions();
$name = isset( $wgParserConf['preprocessorClass'] ) ? $wgParserConf['preprocessorClass'] : 'Preprocessor_DOM';
*/
protected $rc;
- protected function setUp() {
- }
-
/** helper to test SpecialRecentchanges::buildMainQueryConds() */
private function assertConditions( $expected, $requestOptions = null, $message = '' ) {
$context = new RequestContext;