Localisation updates from https://translatewiki.net.
[mediawiki.git] / tests / phpunit / includes / exception / ReadOnlyErrorTest.php
blob734d45e4534df601b853f72fd7c929d547ce5426
1 <?php
3 use MediaWiki\Tests\Unit\DummyServicesTrait;
5 /**
6 * @covers \ReadOnlyError
7 * @author Addshore
8 */
9 class ReadOnlyErrorTest extends MediaWikiIntegrationTestCase {
10 use DummyServicesTrait;
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 );