r97201 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97200‎ | r97201 | r97202 >
Date:20:43, 15 September 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
buildMainQueryConds() (called by assertConditions) uses a wfGetDB( DB_SLAVE )
Although no data is transmitted to/from the server (create a DB_NONE?)
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/specials/SpecialRecentchangesTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
@@ -5,6 +5,7 @@
66 * Copyright © 2011, Ashar Voultoiz
77 *
88 * @author Ashar Voultoiz
 9+ * @group Database
910 */
1011 class SpecialRecentchangesTest extends MediaWikiTestCase {
1112

Comments

#Comment by 😂 (talk | contribs)   13:54, 28 September 2011

I have desired DB_NONE-type behavior before. Sometimes you just want the relevant DB object without actually having a connection to the underlying object.

You can do it with DatabaseBase::factory(), but it's not pretty.

Status & tagging log