MediaWiki
REL1_31
ReadOnlyErrorTest.php
Go to the documentation of this file.
1
<?php
2
7
class
ReadOnlyErrorTest
extends
MediaWikiTestCase
{
8
9
public
function
testConstruction
() {
10
$e
=
new
ReadOnlyError
();
11
$this->assertEquals(
'readonly'
,
$e
->title );
12
$this->assertEquals(
'readonlytext'
,
$e
->msg );
13
$this->assertEquals(
wfReadOnlyReason
() ?: [],
$e
->params );
14
}
15
16
}
wfReadOnlyReason
wfReadOnlyReason()
Check if the site is in read-only mode and return the message if so.
Definition
GlobalFunctions.php:1275
MediaWikiTestCase
Definition
MediaWikiTestCase.php:17
ReadOnlyErrorTest
ReadOnlyError.
Definition
ReadOnlyErrorTest.php:7
ReadOnlyErrorTest\testConstruction
testConstruction()
Definition
ReadOnlyErrorTest.php:9
ReadOnlyError
Show an error when the wiki is locked/read-only and the user tries to do something that requires writ...
Definition
ReadOnlyError.php:28
$e
returning false will NOT prevent logging $e
Definition
hooks.txt:2176
tests
phpunit
includes
exception
ReadOnlyErrorTest.php
Generated on Mon Nov 25 2024 15:36:21 for MediaWiki by
1.10.0