Index: trunk/phase3/tests/phpunit/includes/BlockTest.php |
— | — | @@ -2,6 +2,7 @@ |
3 | 3 | |
4 | 4 | /** |
5 | 5 | * @group Database |
| 6 | + * @group Blocking |
6 | 7 | */ |
7 | 8 | class BlockTest extends MediaWikiLangTestCase { |
8 | 9 | |
— | — | @@ -27,10 +28,6 @@ |
28 | 29 | $user->saveSettings(); |
29 | 30 | } |
30 | 31 | |
31 | | - $this->createBlock( 100500 ); |
32 | | - } |
33 | | - |
34 | | - private function createBlock( $expiry ) { |
35 | 32 | // Delete the last round's block if it's still there |
36 | 33 | $oldBlock = Block::newFromTarget( 'UTBlockee' ); |
37 | 34 | if ( $oldBlock ) { |
— | — | @@ -39,7 +36,7 @@ |
40 | 37 | } |
41 | 38 | |
42 | 39 | $this->block = new Block( 'UTBlockee', 1, 0, |
43 | | - 'Parce que', 0, false, time() + $expiry |
| 40 | + 'Parce que', 0, false, time() + 100500 |
44 | 41 | ); |
45 | 42 | $this->madeAt = wfTimestamp( TS_MW ); |
46 | 43 | |
— | — | @@ -79,8 +76,6 @@ |
80 | 77 | * per bug 26425 |
81 | 78 | */ |
82 | 79 | function testBug26425BlockTimestampDefaultsToTime() { |
83 | | - $this->createBlock( 0 ); |
84 | | - |
85 | 80 | // delta to stop one-off errors when things happen to go over a second mark. |
86 | 81 | $delta = abs( $this->madeAt - $this->block->mTimestamp ); |
87 | 82 | $this->assertLessThan( 2, $delta, "If no timestamp is specified, the block is recorded as time()"); |