r101366 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101365‎ | r101366 | r101367 >
Date:17:00, 31 October 2011
Author:maxsem
Status:ok
Tags:
Comment:
Simplify r101365, this cruft is not really needed
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/BlockTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/BlockTest.php
@@ -2,6 +2,7 @@
33
44 /**
55 * @group Database
 6+ * @group Blocking
67 */
78 class BlockTest extends MediaWikiLangTestCase {
89
@@ -27,10 +28,6 @@
2829 $user->saveSettings();
2930 }
3031
31 - $this->createBlock( 100500 );
32 - }
33 -
34 - private function createBlock( $expiry ) {
3532 // Delete the last round's block if it's still there
3633 $oldBlock = Block::newFromTarget( 'UTBlockee' );
3734 if ( $oldBlock ) {
@@ -39,7 +36,7 @@
4037 }
4138
4239 $this->block = new Block( 'UTBlockee', 1, 0,
43 - 'Parce que', 0, false, time() + $expiry
 40+ 'Parce que', 0, false, time() + 100500
4441 );
4542 $this->madeAt = wfTimestamp( TS_MW );
4643
@@ -79,8 +76,6 @@
8077 * per bug 26425
8178 */
8279 function testBug26425BlockTimestampDefaultsToTime() {
83 - $this->createBlock( 0 );
84 -
8580 // delta to stop one-off errors when things happen to go over a second mark.
8681 $delta = abs( $this->madeAt - $this->block->mTimestamp );
8782 $this->assertLessThan( 2, $delta, "If no timestamp is specified, the block is recorded as time()");

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101365Fixed annoying intermittent BlockTest failures. No surprise we had 'em since ...maxsem16:54, 31 October 2011

Status & tagging log