3 use MediaWiki\Tests\Unit\DummyServicesTrait
;
6 * @covers \ReadOnlyError
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
);