Merge "(bug 37755) Set robot meta tags for 'view source' pages"
[lhc/web/wiklou.git] / tests / phpunit / includes / LinksUpdateTest.php
index 8e37b13..7499272 100644 (file)
@@ -25,7 +25,8 @@ class LinksUpdateTest extends MediaWikiTestCase {
                );
        }
 
-       function setUp() {
+       protected function setUp() {
+               parent::setUp();
                $dbw = wfGetDB( DB_MASTER );
                $dbw->replace(
                        'interwiki',
@@ -151,7 +152,10 @@ class LinksUpdateTest extends MediaWikiTestCase {
        protected function assertLinksUpdate( Title $title, ParserOutput $parserOutput, $table, $fields, $condition, array $expectedRows ) {
                $update = new LinksUpdate( $title, $parserOutput );
 
+               //NOTE: make sure LinksUpdate does not generate warnings when called inside a transaction.
+               $update->beginTransaction();
                $update->doUpdate();
+               $update->commitTransaction();
 
                $this->assertSelect( $table, $fields, $condition, $expectedRows );
        }