| 1 |
<?php |
| 2 |
|
| 3 |
use MediaWiki\Tests\Unit\DummyServicesTrait; |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
class ReadOnlyErrorTest extends MediaWikiIntegrationTestCase { |
| 10 |
use DummyServicesTrait; |
| 11 |
|
| 12 |
public function testConstruction() { |
| 13 |
$reason = 'This site is read-only for $reasons'; |
| 14 |
$this->setService( 'ReadOnlyMode', $this->getDummyReadOnlyMode( $reason ) ); |
| 15 |
$e = new ReadOnlyError(); |
| 16 |
$this->assertEquals( 'readonly', $e->title ); |
| 17 |
$this->assertEquals( 'readonlytext', $e->msg ); |
| 18 |
$this->assertEquals( [ $reason ], $e->params ); |
| 19 |
} |
| 20 |
|
| 21 |
} |