X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FRevisionStorageTest_ContentHandlerUseDB.php;h=4e83e3555ee527fbf01dc99893271a5acd88a2dc;hb=a78c8093a3abd6f43ed0c74e72ec1b9dd23b4168;hp=3948e34595b66541c958f21c1db13961abc34b98;hpb=1bcb2c06e6ee20bd099110ba395e45c953462039;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php b/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php index 3948e34595..4e83e3555e 100644 --- a/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php +++ b/tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php @@ -6,14 +6,9 @@ * ^--- important, causes temporary tables to be used instead of the real database */ class RevisionTest_ContentHandlerUseDB extends RevisionStorageTest { - var $saveContentHandlerNoDB = null; - function setUp() { - global $wgContentHandlerUseDB; - - $this->saveContentHandlerNoDB = $wgContentHandlerUseDB; - - $wgContentHandlerUseDB = false; + protected function setUp() { + $this->setMwGlobals( 'wgContentHandlerUseDB', false ); $dbw = wfGetDB( DB_MASTER ); @@ -32,14 +27,6 @@ class RevisionTest_ContentHandlerUseDB extends RevisionStorageTest { parent::setUp(); } - function tearDown() { - global $wgContentHandlerUseDB; - - parent::tearDown(); - - $wgContentHandlerUseDB = $this->saveContentHandlerNoDB; - } - /** * @covers Revision::selectFields */ @@ -76,7 +63,7 @@ class RevisionTest_ContentHandlerUseDB extends RevisionStorageTest { */ public function testGetContentFormat() { try { - //@todo: change this to test failure on using a non-standard (but supported) format + // @todo change this to test failure on using a non-standard (but supported) format // for a content model supported in the given location. As of 1.21, there are // no alternative formats for any of the standard content models that could be // used for this though. @@ -91,5 +78,4 @@ class RevisionTest_ContentHandlerUseDB extends RevisionStorageTest { $this->assertTrue( true ); // ok } } - }