r89071 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89070‎ | r89071 | r89072 >
Date:21:22, 28 May 2011
Author:hashar
Status:resolved
Tags:
Comment:
ApiBlockTest now remove block it creates

This follow up r88755 that make tests depends on each other. The creation
of a Block through the API is troublesome to the BlockTest suite.

Requires r89070
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/api/ApiBlockTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/api/ApiBlockTest.php
@@ -27,8 +27,12 @@
2828 $user->saveSettings();
2929 }
3030 }
31 -
3231
 32+ function removeDBData() {
 33+ $block = Block::newFromTarget('UTBlockee');
 34+ $block->delete();
 35+ }
 36+
3337
3438 function testMakeNormalBlock() {
3539

Follow-up revisions

RevisionCommit summaryAuthorDate
r89075ApiBlockTest: delete a block only if it exist...hashar21:43, 28 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88755Fixup phpunit tests so we don't drop/create tables on EVERY SINGLE TEST....demon21:22, 24 May 2011
r89070Allow test to remove data from the database...hashar21:19, 28 May 2011

Status & tagging log