12 'None of anything' => [
13 'confMessage' =>
null,
14 'hasFileName' =>
false,
15 'fileContents' =>
false,
17 'expectedState' =>
false,
18 'expectedMessage' =>
false,
19 'expectedConfState' =>
false,
20 'expectedConfMessage' =>
false
23 'confMessage' =>
null,
24 'hasFileName' =>
true,
25 'fileContents' =>
false,
27 'expectedState' =>
false,
28 'expectedMessage' =>
false,
29 'expectedConfState' =>
false,
30 'expectedConfMessage' =>
false
33 'confMessage' =>
null,
34 'hasFileName' =>
true,
37 'expectedState' =>
false,
38 'expectedMessage' =>
false,
39 'expectedConfState' =>
false,
40 'expectedConfMessage' =>
false
42 'File has message' => [
43 'confMessage' =>
null,
44 'hasFileName' =>
true,
45 'fileContents' =>
'Message',
47 'expectedState' =>
true,
48 'expectedMessage' =>
'Message',
49 'expectedConfState' =>
true,
50 'expectedConfMessage' =>
'Message',
52 'Conf has message' => [
53 'confMessage' =>
'Message',
54 'hasFileName' =>
false,
55 'fileContents' =>
false,
57 'expectedState' =>
true,
58 'expectedMessage' =>
'Message',
59 'expectedConfState' =>
true,
60 'expectedConfMessage' =>
'Message'
62 "Conf=false means don't check the file" => [
63 'confMessage' =>
false,
64 'hasFileName' =>
true,
65 'fileContents' =>
'Message',
67 'expectedState' =>
false,
68 'expectedMessage' =>
false,
69 'expectedConfState' =>
false,
70 'expectedConfMessage' =>
false,
73 'confMessage' =>
null,
74 'hasFileName' =>
false,
75 'fileContents' =>
false,
76 'lbMessage' =>
'Message',
77 'expectedState' =>
true,
78 'expectedMessage' =>
'Message',
79 'expectedConfState' =>
false,
80 'expectedConfMessage' =>
false
82 'All three have a message: conf wins' => [
83 'confMessage' =>
'conf',
84 'hasFileName' =>
true,
85 'fileContents' =>
'file',
87 'expectedState' =>
true,
88 'expectedMessage' =>
'conf',
89 'expectedConfState' =>
true,
90 'expectedConfMessage' =>
'conf'
94 foreach ( $rawTests as $desc => $test ) {
95 $cookedTests[
$desc] = [ $test ];
102 'ReadOnly' =>
$params[
'confMessage'],
118 ->disableOriginalConstructor()
120 $lb->expects( $this->
any() )->method(
'getReadOnlyReason' )
121 ->willReturn(
$params[
'lbMessage'] );
126 if (
$params[
'hasFileName'] ) {
129 if (
$params[
'fileContents'] ===
false ) {
161 'confMessage' =>
'conf',
162 'hasFileName' =>
false,
163 'fileContents' =>
false,
167 $rom->setReason(
'override' );
168 $this->
assertSame(
'override', $rom->getReason() );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
they could even be mouse clicks or menu items whatever suits your program You should also get your if any
A Config instance which stores all settings as a member variable.
testWithLB( $params)
provider
createMode( $params, $makeLB)
testWithoutLB( $params)
provider
A service class for fetching the wiki's current read-only mode.
processing should stop and the error should be shown to the user * false