Index: trunk/phase3/tests/phpunit/includes/XmlTest.php |
— | — | @@ -195,43 +195,44 @@ |
196 | 196 | |
197 | 197 | function testNamespaceSelector() { |
198 | 198 | $this->assertEquals( |
199 | | - '<select class="namespaceselector" id="namespace" name="namespace"> |
200 | | -<option value="0">(Main)</option> |
201 | | -<option value="1">Talk</option> |
202 | | -<option value="2">User</option> |
203 | | -<option value="3">User talk</option> |
204 | | -<option value="4">MyWiki</option> |
205 | | -<option value="5">MyWiki Talk</option> |
206 | | -<option value="6">File</option> |
207 | | -<option value="7">File talk</option> |
208 | | -<option value="8">MediaWiki</option> |
209 | | -<option value="9">MediaWiki talk</option> |
210 | | -<option value="10">Template</option> |
211 | | -<option value="11">Template talk</option> |
212 | | -<option value="100">Custom</option> |
213 | | -<option value="101">Custom talk</option> |
214 | | -</select>', |
| 199 | + '<select class="namespaceselector" id="namespace" name="namespace">' . "\n" . |
| 200 | +'<option value="0">(Main)</option>' . "\n" . |
| 201 | +'<option value="1">Talk</option>' . "\n" . |
| 202 | +'<option value="2">User</option>' . "\n" . |
| 203 | +'<option value="3">User talk</option>' . "\n" . |
| 204 | +'<option value="4">MyWiki</option>' . "\n" . |
| 205 | +'<option value="5">MyWiki Talk</option>' . "\n" . |
| 206 | +'<option value="6">File</option>' . "\n" . |
| 207 | +'<option value="7">File talk</option>' . "\n" . |
| 208 | +'<option value="8">MediaWiki</option>' . "\n" . |
| 209 | +'<option value="9">MediaWiki talk</option>' . "\n" . |
| 210 | +'<option value="10">Template</option>' . "\n" . |
| 211 | +'<option value="11">Template talk</option>' . "\n" . |
| 212 | +'<option value="100">Custom</option>' . "\n" . |
| 213 | +'<option value="101">Custom talk</option>' . "\n" . |
| 214 | +'</select>', |
215 | 215 | Xml::namespaceSelector(), |
216 | 216 | 'Basic namespace selector without custom options' |
217 | 217 | ); |
218 | 218 | $this->assertEquals( |
219 | | - '<label for="namespace">Select a namespace:</label> <select class="namespaceselector" id="namespace" name="myname"> |
220 | | -<option value="all">all</option> |
221 | | -<option value="0">(Main)</option> |
222 | | -<option value="1">Talk</option> |
223 | | -<option value="2" selected="">User</option> |
224 | | -<option value="3">User talk</option> |
225 | | -<option value="4">MyWiki</option> |
226 | | -<option value="5">MyWiki Talk</option> |
227 | | -<option value="6">File</option> |
228 | | -<option value="7">File talk</option> |
229 | | -<option value="8">MediaWiki</option> |
230 | | -<option value="9">MediaWiki talk</option> |
231 | | -<option value="10">Template</option> |
232 | | -<option value="11">Template talk</option> |
233 | | -<option value="100">Custom</option> |
234 | | -<option value="101">Custom talk</option> |
235 | | -</select>', |
| 219 | + '<label for="namespace">Select a namespace:</label>' . |
| 220 | +' <select class="namespaceselector" id="namespace" name="myname">' . "\n" . |
| 221 | +'<option value="all">all</option>' . "\n" . |
| 222 | +'<option value="0">(Main)</option>' . "\n" . |
| 223 | +'<option value="1">Talk</option>' . "\n" . |
| 224 | +'<option value="2" selected="">User</option>' . "\n" . |
| 225 | +'<option value="3">User talk</option>' . "\n" . |
| 226 | +'<option value="4">MyWiki</option>' . "\n" . |
| 227 | +'<option value="5">MyWiki Talk</option>' . "\n" . |
| 228 | +'<option value="6">File</option>' . "\n" . |
| 229 | +'<option value="7">File talk</option>' . "\n" . |
| 230 | +'<option value="8">MediaWiki</option>' . "\n" . |
| 231 | +'<option value="9">MediaWiki talk</option>' . "\n" . |
| 232 | +'<option value="10">Template</option>' . "\n" . |
| 233 | +'<option value="11">Template talk</option>' . "\n" . |
| 234 | +'<option value="100">Custom</option>' . "\n" . |
| 235 | +'<option value="101">Custom talk</option>' . "\n" . |
| 236 | +'</select>', |
236 | 237 | Xml::namespaceSelector( $selected = '2', $all = 'all', $element_name = 'myname', $label = 'Select a namespace:' ), |
237 | 238 | 'Basic namespace selector with custom values' |
238 | 239 | ); |
Index: trunk/phase3/tests/phpunit/includes/HtmlTest.php |
— | — | @@ -213,43 +213,44 @@ |
214 | 214 | |
215 | 215 | function testNamespaceSelector() { |
216 | 216 | $this->assertEquals( |
217 | | - '<select id="namespace" name="namespace"> |
218 | | -<option value="0">(Main)</option> |
219 | | -<option value="1">Talk</option> |
220 | | -<option value="2">User</option> |
221 | | -<option value="3">User talk</option> |
222 | | -<option value="4">MyWiki</option> |
223 | | -<option value="5">MyWiki Talk</option> |
224 | | -<option value="6">File</option> |
225 | | -<option value="7">File talk</option> |
226 | | -<option value="8">MediaWiki</option> |
227 | | -<option value="9">MediaWiki talk</option> |
228 | | -<option value="10">Template</option> |
229 | | -<option value="11">Template talk</option> |
230 | | -<option value="100">Custom</option> |
231 | | -<option value="101">Custom talk</option> |
232 | | -</select>', |
| 217 | + '<select id="namespace" name="namespace">' . "\n" . |
| 218 | +'<option value="0">(Main)</option>' . "\n" . |
| 219 | +'<option value="1">Talk</option>' . "\n" . |
| 220 | +'<option value="2">User</option>' . "\n" . |
| 221 | +'<option value="3">User talk</option>' . "\n" . |
| 222 | +'<option value="4">MyWiki</option>' . "\n" . |
| 223 | +'<option value="5">MyWiki Talk</option>' . "\n" . |
| 224 | +'<option value="6">File</option>' . "\n" . |
| 225 | +'<option value="7">File talk</option>' . "\n" . |
| 226 | +'<option value="8">MediaWiki</option>' . "\n" . |
| 227 | +'<option value="9">MediaWiki talk</option>' . "\n" . |
| 228 | +'<option value="10">Template</option>' . "\n" . |
| 229 | +'<option value="11">Template talk</option>' . "\n" . |
| 230 | +'<option value="100">Custom</option>' . "\n" . |
| 231 | +'<option value="101">Custom talk</option>' . "\n" . |
| 232 | +'</select>', |
233 | 233 | Html::namespaceSelector(), |
234 | 234 | 'Basic namespace selector without custom options' |
235 | 235 | ); |
236 | 236 | $this->assertEquals( |
237 | | - '<label for="mw-test-namespace">Select a namespace:</label> <select id="mw-test-namespace" name="wpNamespace"> |
238 | | -<option value="all">all</option> |
239 | | -<option value="0">(Main)</option> |
240 | | -<option value="1">Talk</option> |
241 | | -<option value="2" selected="">User</option> |
242 | | -<option value="3">User talk</option> |
243 | | -<option value="4">MyWiki</option> |
244 | | -<option value="5">MyWiki Talk</option> |
245 | | -<option value="6">File</option> |
246 | | -<option value="7">File talk</option> |
247 | | -<option value="8">MediaWiki</option> |
248 | | -<option value="9">MediaWiki talk</option> |
249 | | -<option value="10">Template</option> |
250 | | -<option value="11">Template talk</option> |
251 | | -<option value="100">Custom</option> |
252 | | -<option value="101">Custom talk</option> |
253 | | -</select>', |
| 237 | + '<label for="mw-test-namespace">Select a namespace:</label> ' . |
| 238 | +'<select id="mw-test-namespace" name="wpNamespace">' . "\n" . |
| 239 | +'<option value="all">all</option>' . "\n" . |
| 240 | +'<option value="0">(Main)</option>' . "\n" . |
| 241 | +'<option value="1">Talk</option>' . "\n" . |
| 242 | +'<option value="2" selected="">User</option>' . "\n" . |
| 243 | +'<option value="3">User talk</option>' . "\n" . |
| 244 | +'<option value="4">MyWiki</option>' . "\n" . |
| 245 | +'<option value="5">MyWiki Talk</option>' . "\n" . |
| 246 | +'<option value="6">File</option>' . "\n" . |
| 247 | +'<option value="7">File talk</option>' . "\n" . |
| 248 | +'<option value="8">MediaWiki</option>' . "\n" . |
| 249 | +'<option value="9">MediaWiki talk</option>' . "\n" . |
| 250 | +'<option value="10">Template</option>' . "\n" . |
| 251 | +'<option value="11">Template talk</option>' . "\n" . |
| 252 | +'<option value="100">Custom</option>' . "\n" . |
| 253 | +'<option value="101">Custom talk</option>' . "\n" . |
| 254 | +'</select>', |
254 | 255 | Html::namespaceSelector( |
255 | 256 | array( 'selected' => '2', 'all' => 'all', 'label' => 'Select a namespace:' ), |
256 | 257 | array( 'name' => 'wpNamespace', 'id' => 'mw-test-namespace' ) |