Follow-up r85302: new MediaWiki() constructor format in phpunit test declaration.
[lhc/web/wiklou.git] / tests / phpunit / includes / MediaWikiTest.php
1 <?php
2 /**
3 * Test class for MediaWiki.
4 * Generated by PHPUnit on 2011-02-06 at 11:41:23.
5 */
6 class MediaWikiTest extends MediaWikiTestCase {
7 /**
8 * @var MediaWiki
9 */
10 protected $object;
11
12 protected function setUp() {
13 $context = new RequestContext;
14 $this->object = new MediaWiki( $context );
15 }
16
17 protected function tearDown() {
18 $this->object = NULL;
19 }
20
21 /**
22 * Test case insentiveness for get / set
23 */
24 public function testSetGetValKeyInsentiveness() {
25
26 // set with lower case key
27 $value = 'SomeValue';
28 $this->object->setVal( 'foobar', $value );
29
30 $this->assertEquals(
31 $this->object->getVal( 'foobar' ), 'SomeValue',
32 'lower case key set, getting lower case key'
33 );
34 $this->assertEquals(
35 $this->object->getVal( 'FOOBAR' ), 'SomeValue',
36 'lower case key set, getting upper case key'
37 );
38
39 // set with Mixed case key
40 $value = 'SomeValue2';
41 $this->object->setVal( 'FooBar', $value );
42
43 $this->assertEquals(
44 $this->object->getVal( 'foobar' ), 'SomeValue2',
45 'mixed case key set, getting lower case key'
46 );
47 $this->assertEquals(
48 $this->object->getVal( 'FOOBAR' ), 'SomeValue2',
49 'mixed case key set, getting upper case key'
50 );
51 }
52
53 public function testGetValWithDefault() {
54 $this->assertEmpty(
55 $this->object->getVal( 'NonExistent' ),
56 'Non existent key return empty string'
57 );
58 $this->assertEquals(
59 $this->object->getVal( 'NonExistent2', 'Default Value' ), 'Default Value',
60 'Non existent key with default given, should give default'
61 );
62 }
63
64 /**
65 * @todo Implement testPerformRequestForTitle().
66 */
67 public function testPerformRequestForTitle() {
68 // Remove the following lines when you implement this test.
69 $this->markTestIncomplete(
70 'This test has not been implemented yet.'
71 );
72 }
73
74 /**
75 * @todo Implement testCheckMaxLag().
76 */
77 public function testCheckMaxLag() {
78 // Remove the following lines when you implement this test.
79 $this->markTestIncomplete(
80 'This test has not been implemented yet.'
81 );
82 }
83
84 /**
85 * @todo Implement testCheckInitialQueries().
86 */
87 public function testCheckInitialQueries() {
88 // Remove the following lines when you implement this test.
89 $this->markTestIncomplete(
90 'This test has not been implemented yet.'
91 );
92 }
93
94 /**
95 * @todo Implement testPreliminaryChecks().
96 */
97 public function testPreliminaryChecks() {
98 // Remove the following lines when you implement this test.
99 $this->markTestIncomplete(
100 'This test has not been implemented yet.'
101 );
102 }
103
104 /**
105 * @todo Implement testHandleSpecialCases().
106 */
107 public function testHandleSpecialCases() {
108 // Remove the following lines when you implement this test.
109 $this->markTestIncomplete(
110 'This test has not been implemented yet.'
111 );
112 }
113
114 /**
115 * @todo Implement testArticleFromTitle().
116 */
117 public function testArticleFromTitle() {
118 // Remove the following lines when you implement this test.
119 $this->markTestIncomplete(
120 'This test has not been implemented yet.'
121 );
122 }
123
124 /**
125 * @todo Implement testGetAction().
126 */
127 public function testGetAction() {
128 // Remove the following lines when you implement this test.
129 $this->markTestIncomplete(
130 'This test has not been implemented yet.'
131 );
132 }
133
134 /**
135 * @todo Implement testInitializeArticle().
136 */
137 public function testInitializeArticle() {
138 // Remove the following lines when you implement this test.
139 $this->markTestIncomplete(
140 'This test has not been implemented yet.'
141 );
142 }
143
144 /**
145 * @todo Implement testFinalCleanup().
146 */
147 public function testFinalCleanup() {
148 // Remove the following lines when you implement this test.
149 $this->markTestIncomplete(
150 'This test has not been implemented yet.'
151 );
152 }
153
154 /**
155 * @todo Implement testDoJobs().
156 */
157 public function testDoJobs() {
158 // Remove the following lines when you implement this test.
159 $this->markTestIncomplete(
160 'This test has not been implemented yet.'
161 );
162 }
163
164 /**
165 * @todo Implement testRestInPeace().
166 */
167 public function testRestInPeace() {
168 // Remove the following lines when you implement this test.
169 $this->markTestIncomplete(
170 'This test has not been implemented yet.'
171 );
172 }
173
174 /**
175 * @todo Implement testPerformAction().
176 */
177 public function testPerformAction() {
178 // Remove the following lines when you implement this test.
179 $this->markTestIncomplete(
180 'This test has not been implemented yet.'
181 );
182 }
183 }