* By using the same summary for both, we allow both sets of tests to pass with --filter Block
* Just testing includes/BlockTest.php still passes
/**
* @group Database
- * @group Broken
*/
-class BlockTest extends MediaWikiLangTestCase {
+class BlockTest extends MediaWikiTestCase {
+
+ const REASON = "Some reason";
private $block, $madeAt;
}
$this->block = new Block( 'UTBlockee', 1, 0,
- 'Parce que'
+ self::REASON
);
$this->madeAt = wfTimestamp( TS_MW );
// $this->dumpBlocks();
$this->assertTrue( $this->block->equals( Block::newFromTarget('UTBlockee') ), "newFromTarget() returns the same block as the one that was made");
-
+
$this->assertTrue( $this->block->equals( Block::newFromID( $this->blockId ) ), "newFromID() returns the same block as the one that was made");
}
$data = $this->doApiRequest( array(
'action' => 'block',
'user' => 'UTBlockee',
- 'reason' => 'Some reason',
+ 'reason' => BlockTest::REASON,
'token' => $pageinfo['blocktoken'] ), $data );
$block = Block::newFromTarget('UTBlockee');