Index: trunk/phase3/tests/phpunit/includes/BlockTest.php |
— | — | @@ -6,26 +6,26 @@ |
7 | 7 | class BlockTest extends MediaWikiLangTestCase { |
8 | 8 | |
9 | 9 | const REASON = "Some reason"; |
10 | | - |
| 10 | + |
11 | 11 | private $block, $madeAt; |
12 | 12 | |
13 | 13 | /* variable used to save up the blockID we insert in this test suite */ |
14 | 14 | private $blockId; |
15 | | - |
| 15 | + |
16 | 16 | function setUp() { |
17 | 17 | global $wgContLang; |
18 | 18 | parent::setUp(); |
19 | 19 | $wgContLang = Language::factory( 'en' ); |
20 | 20 | } |
21 | | - |
| 21 | + |
22 | 22 | function addDBData() { |
23 | 23 | //$this->dumpBlocks(); |
24 | | - |
| 24 | + |
25 | 25 | $user = User::newFromName( 'UTBlockee' ); |
26 | 26 | if( $user->getID() == 0 ) { |
27 | 27 | $user->addToDatabase(); |
28 | 28 | $user->setPassword( 'UTBlockeePassword' ); |
29 | | - |
| 29 | + |
30 | 30 | $user->saveSettings(); |
31 | 31 | } |
32 | 32 | |
— | — | @@ -70,16 +70,16 @@ |
71 | 71 | $this->assertTrue( $this->block->equals( Block::newFromTarget('UTBlockee') ), "newFromTarget() returns the same block as the one that was made"); |
72 | 72 | |
73 | 73 | $this->assertTrue( $this->block->equals( Block::newFromID( $this->blockId ) ), "newFromID() returns the same block as the one that was made"); |
74 | | - |
| 74 | + |
75 | 75 | } |
76 | | - |
| 76 | + |
77 | 77 | /** |
78 | 78 | * per bug 26425 |
79 | 79 | */ |
80 | 80 | function testBug26425BlockTimestampDefaultsToTime() { |
81 | | - |
| 81 | + |
82 | 82 | $this->assertEquals( $this->madeAt, $this->block->mTimestamp, "If no timestamp is specified, the block is recorded as time()"); |
83 | | - |
| 83 | + |
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |