Index: trunk/phase3/tests/phpunit/includes/BlockTest.php |
— | — | @@ -2,9 +2,10 @@ |
3 | 3 | |
4 | 4 | /** |
5 | 5 | * @group Database |
6 | | - * @group Broken |
7 | 6 | */ |
8 | | -class BlockTest extends MediaWikiLangTestCase { |
| 7 | +class BlockTest extends MediaWikiTestCase { |
| 8 | + |
| 9 | + const REASON = "Some reason"; |
9 | 10 | |
10 | 11 | private $block, $madeAt; |
11 | 12 | |
— | — | @@ -29,7 +30,7 @@ |
30 | 31 | } |
31 | 32 | |
32 | 33 | $this->block = new Block( 'UTBlockee', 1, 0, |
33 | | - 'Parce que' |
| 34 | + self::REASON |
34 | 35 | ); |
35 | 36 | $this->madeAt = wfTimestamp( TS_MW ); |
36 | 37 | |
— | — | @@ -55,7 +56,7 @@ |
56 | 57 | // $this->dumpBlocks(); |
57 | 58 | |
58 | 59 | $this->assertTrue( $this->block->equals( Block::newFromTarget('UTBlockee') ), "newFromTarget() returns the same block as the one that was made"); |
59 | | - |
| 60 | + |
60 | 61 | $this->assertTrue( $this->block->equals( Block::newFromID( $this->blockId ) ), "newFromID() returns the same block as the one that was made"); |
61 | 62 | |
62 | 63 | } |
Index: trunk/phase3/tests/phpunit/includes/api/ApiBlockTest.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | $data = $this->doApiRequest( array( |
51 | 51 | 'action' => 'block', |
52 | 52 | 'user' => 'UTBlockee', |
53 | | - 'reason' => 'Some reason', |
| 53 | + 'reason' => BlockTest::REASON, |
54 | 54 | 'token' => $pageinfo['blocktoken'] ), $data ); |
55 | 55 | |
56 | 56 | $block = Block::newFromTarget('UTBlockee'); |