(sort of bug 32410) Fix EXIF GPSAltitude calculation when below sea level.
[lhc/web/wiklou.git] / tests / phpunit / includes / MWNamespaceTest.php
1 <?php
2 /**
3 * @author Antoine Musso
4 * @copyright Copyright © 2011, Antoine Musso
5 * @file
6 */
7
8 /**
9 * Test class for MWNamespace.
10 * Generated by PHPUnit on 2011-02-20 at 21:01:55.
11 *
12 */
13 class MWNamespaceTest extends MediaWikiTestCase {
14 /**
15 * Sets up the fixture, for example, opens a network connection.
16 * This method is called before a test is executed.
17 */
18 protected function setUp() {
19 }
20
21 /**
22 * Tears down the fixture, for example, closes a network connection.
23 * This method is called after a test is executed.
24 */
25 protected function tearDown() {
26 }
27
28
29 #### START OF TESTS #########################################################
30
31 /**
32 * @todo Write more texts, handle $wgAllowImageMoving setting
33 */
34 public function testIsMovable() {
35 $this->assertFalse( MWNamespace::isMovable( NS_CATEGORY ) );
36 # @todo FIXME: Write more tests!!
37 }
38
39 /**
40 * Please make sure to change testIsTalk() if you change the assertions below
41 */
42 public function testIsSubject() {
43 // Special namespaces
44 $this->assertIsSubject( NS_MEDIA );
45 $this->assertIsSubject( NS_SPECIAL );
46
47 // Subject pages
48 $this->assertIsSubject( NS_MAIN );
49 $this->assertIsSubject( NS_USER );
50 $this->assertIsSubject( 100 ); # user defined
51
52 // Talk pages
53 $this->assertIsNotSubject( NS_TALK );
54 $this->assertIsNotSubject( NS_USER_TALK );
55 $this->assertIsNotSubject( 101 ); # user defined
56 }
57
58 /**
59 * Reverse of testIsSubject().
60 * Please update testIsSubject() if you change assertions below
61 */
62 public function testIsTalk() {
63 // Special namespaces
64 $this->assertIsNotTalk( NS_MEDIA );
65 $this->assertIsNotTalk( NS_SPECIAL );
66
67 // Subject pages
68 $this->assertIsNotTalk( NS_MAIN );
69 $this->assertIsNotTalk( NS_USER );
70 $this->assertIsNotTalk( 100 ); # user defined
71
72 // Talk pages
73 $this->assertIsTalk( NS_TALK );
74 $this->assertIsTalk( NS_USER_TALK );
75 $this->assertIsTalk( 101 ); # user defined
76 }
77
78 /**
79 */
80 public function testGetSubject() {
81 // Special namespaces are their own subjects
82 $this->assertEquals( NS_MEDIA, MWNamespace::getSubject( NS_MEDIA ) );
83 $this->assertEquals( NS_SPECIAL, MWNamespace::getSubject( NS_SPECIAL ) );
84
85 $this->assertEquals( NS_MAIN, MWNamespace::getSubject( NS_TALK ) );
86 $this->assertEquals( NS_USER, MWNamespace::getSubject( NS_USER_TALK ) );
87 }
88
89 /**
90 * Regular getTalk() calls
91 * Namespaces without a talk page (NS_MEDIA, NS_SPECIAL) are tested in
92 * the function testGetTalkExceptions()
93 */
94 public function testGetTalk() {
95 $this->assertEquals( NS_TALK, MWNamespace::getTalk( NS_MAIN ) );
96 $this->assertEquals( NS_TALK, MWNamespace::getTalk( NS_TALK ) );
97 $this->assertEquals( NS_USER_TALK, MWNamespace::getTalk( NS_USER ) );
98 $this->assertEquals( NS_USER_TALK, MWNamespace::getTalk( NS_USER_TALK ) );
99 }
100
101 /**
102 * Exceptions with getTalk()
103 * NS_MEDIA does not have talk pages. MediaWiki raise an exception for them.
104 * @expectedException MWException
105 */
106 public function testGetTalkExceptionsForNsMedia() {
107 $this->assertNull( MWNamespace::getTalk( NS_MEDIA ) );
108 }
109
110 /**
111 * Exceptions with getTalk()
112 * NS_SPECIAL does not have talk pages. MediaWiki raise an exception for them.
113 * @expectedException MWException
114 */
115 public function testGetTalkExceptionsForNsSpecial() {
116 $this->assertNull( MWNamespace::getTalk( NS_SPECIAL ) );
117 }
118
119 /**
120 * Regular getAssociated() calls
121 * Namespaces without an associated page (NS_MEDIA, NS_SPECIAL) are tested in
122 * the function testGetAssociatedExceptions()
123 */
124 public function testGetAssociated() {
125 $this->assertEquals( NS_TALK, MWNamespace::getAssociated( NS_MAIN ) );
126 $this->assertEquals( NS_MAIN, MWNamespace::getAssociated( NS_TALK ) );
127
128 }
129
130 ### Exceptions with getAssociated()
131 ### NS_MEDIA and NS_SPECIAL do not have talk pages. MediaWiki raises
132 ### an exception for them.
133 /**
134 * @expectedException MWException
135 */
136 public function testGetAssociatedExceptionsForNsMedia() {
137 $this->assertNull( MWNamespace::getAssociated( NS_MEDIA ) );
138 }
139
140 /**
141 * @expectedException MWException
142 */
143 public function testGetAssociatedExceptionsForNsSpecial() {
144 $this->assertNull( MWNamespace::getAssociated( NS_SPECIAL ) );
145 }
146
147 /**
148 * @todo Implement testExists().
149 */
150 /*
151 public function testExists() {
152 // Remove the following lines when you implement this test.
153 $this->markTestIncomplete(
154 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
155 );
156 }
157 */
158
159 /**
160 * Test MWNamespace::equals
161 * Note if we add a namespace registration system with keys like 'MAIN'
162 * we should add tests here for equivilance on things like 'MAIN' == 0
163 * and 'MAIN' == NS_MAIN.
164 */
165 public function testEquals() {
166 $this->assertTrue( MWNamespace::equals( NS_MAIN, NS_MAIN ) );
167 $this->assertTrue( MWNamespace::equals( NS_MAIN, 0 ) ); // In case we make NS_MAIN 'MAIN'
168 $this->assertTrue( MWNamespace::equals( NS_USER, NS_USER ) );
169 $this->assertTrue( MWNamespace::equals( NS_USER, 2 ) );
170 $this->assertTrue( MWNamespace::equals( NS_USER_TALK, NS_USER_TALK ) );
171 $this->assertTrue( MWNamespace::equals( NS_SPECIAL, NS_SPECIAL ) );
172 $this->assertFalse( MWNamespace::equals( NS_MAIN, NS_TALK ) );
173 $this->assertFalse( MWNamespace::equals( NS_USER, NS_USER_TALK ) );
174 $this->assertFalse( MWNamespace::equals( NS_PROJECT, NS_TEMPLATE ) );
175 }
176
177 /**
178 * Test MWNamespace::subjectEquals
179 */
180 public function testSubjectEquals() {
181 $this->assertSameSubject( NS_MAIN, NS_MAIN );
182 $this->assertSameSubject( NS_MAIN, 0 ); // In case we make NS_MAIN 'MAIN'
183 $this->assertSameSubject( NS_USER, NS_USER );
184 $this->assertSameSubject( NS_USER, 2 );
185 $this->assertSameSubject( NS_USER_TALK, NS_USER_TALK );
186 $this->assertSameSubject( NS_SPECIAL, NS_SPECIAL );
187 $this->assertSameSubject( NS_MAIN, NS_TALK );
188 $this->assertSameSubject( NS_USER, NS_USER_TALK );
189
190 $this->assertDifferentSubject( NS_PROJECT, NS_TEMPLATE );
191 $this->assertDifferentSubject( NS_SPECIAL, NS_MAIN );
192 }
193
194 public function testSpecialAndMediaAreDifferentSubjects() {
195 $this->assertDifferentSubject(
196 NS_MEDIA, NS_SPECIAL,
197 "NS_MEDIA and NS_SPECIAL are different subject namespaces"
198 );
199 $this->assertDifferentSubject(
200 NS_SPECIAL, NS_MEDIA,
201 "NS_SPECIAL and NS_MEDIA are different subject namespaces"
202 );
203
204 }
205
206 /**
207 * @todo Implement testGetCanonicalNamespaces().
208 */
209 /*
210 public function testGetCanonicalNamespaces() {
211 // Remove the following lines when you implement this test.
212 $this->markTestIncomplete(
213 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
214 );
215 }
216 */
217 /**
218 * @todo Implement testGetCanonicalName().
219 */
220 /*
221 public function testGetCanonicalName() {
222 // Remove the following lines when you implement this test.
223 $this->markTestIncomplete(
224 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
225 );
226 }
227 */
228 /**
229 * @todo Implement testGetCanonicalIndex().
230 */
231 /*
232 public function testGetCanonicalIndex() {
233 // Remove the following lines when you implement this test.
234 $this->markTestIncomplete(
235 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
236 );
237 }
238 */
239 /**
240 * @todo Implement testGetValidNamespaces().
241 */
242 /*
243 public function testGetValidNamespaces() {
244 // Remove the following lines when you implement this test.
245 $this->markTestIncomplete(
246 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
247 );
248 }
249 */
250 /**
251 */
252 public function testCanTalk() {
253 $this->assertCanNotTalk( NS_MEDIA );
254 $this->assertCanNotTalk( NS_SPECIAL );
255
256 $this->assertCanTalk( NS_MAIN );
257 $this->assertCanTalk( NS_TALK );
258 $this->assertCanTalk( NS_USER );
259 $this->assertCanTalk( NS_USER_TALK );
260
261 // User defined namespaces
262 $this->assertCanTalk( 100 );
263 $this->assertCanTalk( 101 );
264 }
265
266 /**
267 */
268 public function testIsContent() {
269 // NS_MAIN is a content namespace per DefaultSettings.php
270 // and per function definition.
271 $this->assertIsContent( NS_MAIN );
272
273 global $wgContentNamespaces;
274
275 $saved = $wgContentNamespaces;
276
277 $wgContentNamespaces[] = NS_MAIN;
278 $this->assertIsContent( NS_MAIN );
279
280 // Other namespaces which are not expected to be content
281 if ( isset( $wgContentNamespaces[NS_MEDIA] ) ) {
282 unset( $wgContentNamespaces[NS_MEDIA] );
283 }
284 $this->assertIsNotContent( NS_MEDIA );
285
286 if ( isset( $wgContentNamespaces[NS_SPECIAL] ) ) {
287 unset( $wgContentNamespaces[NS_SPECIAL] );
288 }
289 $this->assertIsNotContent( NS_SPECIAL );
290
291 if ( isset( $wgContentNamespaces[NS_TALK] ) ) {
292 unset( $wgContentNamespaces[NS_TALK] );
293 }
294 $this->assertIsNotContent( NS_TALK );
295
296 if ( isset( $wgContentNamespaces[NS_USER] ) ) {
297 unset( $wgContentNamespaces[NS_USER] );
298 }
299 $this->assertIsNotContent( NS_USER );
300
301 if ( isset( $wgContentNamespaces[NS_CATEGORY] ) ) {
302 unset( $wgContentNamespaces[NS_CATEGORY] );
303 }
304 $this->assertIsNotContent( NS_CATEGORY );
305
306 if ( isset( $wgContentNamespaces[100] ) ) {
307 unset( $wgContentNamespaces[100] );
308 }
309 $this->assertIsNotContent( 100 );
310
311 $wgContentNamespaces = $saved;
312 }
313
314 /**
315 * Similar to testIsContent() but alters the $wgContentNamespaces
316 * global variable.
317 */
318 public function testIsContentWithAdditionsInWgContentNamespaces() {
319 // NS_MAIN is a content namespace per DefaultSettings.php
320 // and per function definition.
321 $this->assertIsContent( NS_MAIN );
322
323 // Tests that user defined namespace #252 is not content:
324 $this->assertIsNotContent( 252 );
325
326 # @todo FIXME: Is global saving really required for PHPUnit?
327 // Bless namespace # 252 as a content namespace
328 global $wgContentNamespaces;
329 $savedGlobal = $wgContentNamespaces;
330 $wgContentNamespaces[] = 252;
331 $this->assertIsContent( 252 );
332
333 // Makes sure NS_MAIN was not impacted
334 $this->assertIsContent( NS_MAIN );
335
336 // Restore global
337 $wgContentNamespaces = $savedGlobal;
338
339 // Verify namespaces after global restauration
340 $this->assertIsContent( NS_MAIN );
341 $this->assertIsNotContent( 252 );
342 }
343
344 public function testIsWatchable() {
345 // Specials namespaces are not watchable
346 $this->assertIsNotWatchable( NS_MEDIA );
347 $this->assertIsNotWatchable( NS_SPECIAL );
348
349 // Core defined namespaces are watchables
350 $this->assertIsWatchable( NS_MAIN );
351 $this->assertIsWatchable( NS_TALK );
352
353 // Additional, user defined namespaces are watchables
354 $this->assertIsWatchable( 100 );
355 $this->assertIsWatchable( 101 );
356 }
357
358 public function testHasSubpages() {
359 // Special namespaces:
360 $this->assertHasNotSubpages( NS_MEDIA );
361 $this->assertHasNotSubpages( NS_SPECIAL );
362
363 // namespaces without subpages
364 # save up global
365 global $wgNamespacesWithSubpages;
366 $saved = null;
367 if( array_key_exists( NS_MAIN, $wgNamespacesWithSubpages ) ) {
368 $saved = $wgNamespacesWithSubpages[NS_MAIN];
369 unset( $wgNamespacesWithSubpages[NS_MAIN] );
370 }
371
372 $this->assertHasNotSubpages( NS_MAIN );
373
374 $wgNamespacesWithSubpages[NS_MAIN] = true;
375 $this->assertHasSubpages( NS_MAIN );
376 $wgNamespacesWithSubpages[NS_MAIN] = false;
377 $this->assertHasNotSubpages( NS_MAIN );
378
379 # restore global
380 if( $saved !== null ) {
381 $wgNamespacesWithSubpages[NS_MAIN] = $saved;
382 }
383
384 // Some namespaces with subpages
385 $this->assertHasSubpages( NS_TALK );
386 $this->assertHasSubpages( NS_USER );
387 $this->assertHasSubpages( NS_USER_TALK );
388 }
389
390 /**
391 */
392 public function testGetContentNamespaces() {
393 $this->assertEquals(
394 array( NS_MAIN ),
395 MWNamespace::getcontentNamespaces(),
396 '$wgContentNamespaces is an array with only NS_MAIN by default'
397 );
398
399 global $wgContentNamespaces;
400
401 $saved = $wgContentNamespaces;
402 # test !is_array( $wgcontentNamespaces )
403 $wgContentNamespaces = '';
404 $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
405 $wgContentNamespaces = false;
406 $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
407 $wgContentNamespaces = null;
408 $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
409 $wgContentNamespaces = 5;
410 $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
411
412 # test $wgContentNamespaces === array()
413 $wgContentNamespaces = array();
414 $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() );
415
416 # test !in_array( NS_MAIN, $wgContentNamespaces )
417 $wgContentNamespaces = array( NS_USER, NS_CATEGORY );
418 $this->assertEquals(
419 array( NS_MAIN, NS_USER, NS_CATEGORY ),
420 MWNamespace::getcontentNamespaces(),
421 'NS_MAIN is forced in $wgContentNamespaces even if unwanted'
422 );
423
424 # test other cases, return $wgcontentNamespaces as is
425 $wgContentNamespaces = array( NS_MAIN );
426 $this->assertEquals(
427 array( NS_MAIN ),
428 MWNamespace::getcontentNamespaces()
429 );
430
431 $wgContentNamespaces = array( NS_MAIN, NS_USER, NS_CATEGORY );
432 $this->assertEquals(
433 array( NS_MAIN, NS_USER, NS_CATEGORY ),
434 MWNamespace::getcontentNamespaces()
435 );
436
437 $wgContentNamespaces = $saved;
438 }
439
440 /**
441 */
442 public function testGetSubjectNamespaces() {
443 $subjectsNS = MWNamespace::getSubjectNamespaces();
444 $this->assertContains( NS_MAIN, $subjectsNS,
445 "Talk namespaces should have NS_MAIN" );
446 $this->assertNotContains( NS_TALK, $subjectsNS,
447 "Talk namespaces should have NS_TALK" );
448
449 $this->assertNotContains( NS_MEDIA, $subjectsNS,
450 "Talk namespaces should not have NS_MEDIA" );
451 $this->assertNotContains( NS_SPECIAL, $subjectsNS,
452 "Talk namespaces should not have NS_SPECIAL" );
453 }
454
455 /**
456 */
457 public function testGetTalkNamespaces() {
458 $talkNS = MWNamespace::getTalkNamespaces();
459 $this->assertContains( NS_TALK, $talkNS,
460 "Subject namespaces should have NS_TALK" );
461 $this->assertNotContains( NS_MAIN, $talkNS,
462 "Subject namespaces should not have NS_MAIN" );
463
464 $this->assertNotContains( NS_MEDIA, $talkNS,
465 "Subject namespaces should not have NS_MEDIA" );
466 $this->assertNotContains( NS_SPECIAL, $talkNS,
467 "Subject namespaces should not have NS_SPECIAL" );
468 }
469
470 /**
471 * Some namespaces are always capitalized per code definition
472 * in MWNamespace::$alwaysCapitalizedNamespaces
473 */
474 public function testIsCapitalizedHardcodedAssertions() {
475 // NS_MEDIA and NS_FILE are treated the same
476 $this->assertEquals(
477 MWNamespace::isCapitalized( NS_MEDIA ),
478 MWNamespace::isCapitalized( NS_FILE ),
479 'NS_MEDIA and NS_FILE have same capitalization rendering'
480 );
481
482 // Boths are capitalized by default
483 $this->assertIsCapitalized( NS_MEDIA );
484 $this->assertIsCapitalized( NS_FILE );
485
486 // Always capitalized namespaces
487 // @see MWNamespace::$alwaysCapitalizedNamespaces
488 $this->assertIsCapitalized( NS_SPECIAL );
489 $this->assertIsCapitalized( NS_USER );
490 $this->assertIsCapitalized( NS_MEDIAWIKI );
491 }
492
493 /**
494 * Follows up for testIsCapitalizedHardcodedAssertions() but alter the
495 * global $wgCapitalLink setting to have extended coverage.
496 *
497 * MWNamespace::isCapitalized() rely on two global settings:
498 * $wgCapitalLinkOverrides = array(); by default
499 * $wgCapitalLinks = true; by default
500 * This function test $wgCapitalLinks
501 *
502 * Global setting correctness is tested against the NS_PROJECT and
503 * NS_PROJECT_TALK namespaces since they are not hardcoded nor specials
504 */
505 public function testIsCapitalizedWithWgCapitalLinks() {
506 global $wgCapitalLinks;
507 // Save the global to easily reset to MediaWiki default settings
508 $savedGlobal = $wgCapitalLinks;
509
510 $wgCapitalLinks = true;
511 $this->assertIsCapitalized( NS_PROJECT );
512 $this->assertIsCapitalized( NS_PROJECT_TALK );
513
514 $wgCapitalLinks = false;
515 // hardcoded namespaces (see above function) are still capitalized:
516 $this->assertIsCapitalized( NS_SPECIAL );
517 $this->assertIsCapitalized( NS_USER );
518 $this->assertIsCapitalized( NS_MEDIAWIKI );
519 // setting is correctly applied
520 $this->assertIsNotCapitalized( NS_PROJECT );
521 $this->assertIsNotCapitalized( NS_PROJECT_TALK );
522
523 // reset global state:
524 $wgCapitalLinks = $savedGlobal;
525 }
526
527 /**
528 * Counter part for MWNamespace::testIsCapitalizedWithWgCapitalLinks() now
529 * testing the $wgCapitalLinkOverrides global.
530 *
531 * @todo split groups of assertions in autonomous testing functions
532 */
533 public function testIsCapitalizedWithWgCapitalLinkOverrides() {
534 global $wgCapitalLinkOverrides;
535 // Save the global to easily reset to MediaWiki default settings
536 $savedGlobal = $wgCapitalLinkOverrides;
537
538 // Test default settings
539 $this->assertIsCapitalized( NS_PROJECT );
540 $this->assertIsCapitalized( NS_PROJECT_TALK );
541 // hardcoded namespaces (see above function) are capitalized:
542 $this->assertIsCapitalized( NS_SPECIAL );
543 $this->assertIsCapitalized( NS_USER );
544 $this->assertIsCapitalized( NS_MEDIAWIKI );
545
546 // Hardcoded namespaces remains capitalized
547 $wgCapitalLinkOverrides[NS_SPECIAL] = false;
548 $wgCapitalLinkOverrides[NS_USER] = false;
549 $wgCapitalLinkOverrides[NS_MEDIAWIKI] = false;
550 $this->assertIsCapitalized( NS_SPECIAL );
551 $this->assertIsCapitalized( NS_USER );
552 $this->assertIsCapitalized( NS_MEDIAWIKI );
553
554 $wgCapitalLinkOverrides = $savedGlobal;
555 $wgCapitalLinkOverrides[NS_PROJECT] = false;
556 $this->assertIsNotCapitalized( NS_PROJECT );
557 $wgCapitalLinkOverrides[NS_PROJECT] = true ;
558 $this->assertIsCapitalized( NS_PROJECT );
559 unset( $wgCapitalLinkOverrides[NS_PROJECT] );
560 $this->assertIsCapitalized( NS_PROJECT );
561
562 // reset global state:
563 $wgCapitalLinkOverrides = $savedGlobal;
564 }
565
566 public function testHasGenderDistinction() {
567 // Namespaces with gender distinctions
568 $this->assertTrue( MWNamespace::hasGenderDistinction( NS_USER ) );
569 $this->assertTrue( MWNamespace::hasGenderDistinction( NS_USER_TALK ) );
570
571 // Other ones, "genderless"
572 $this->assertFalse( MWNamespace::hasGenderDistinction( NS_MEDIA ) );
573 $this->assertFalse( MWNamespace::hasGenderDistinction( NS_SPECIAL ) );
574 $this->assertFalse( MWNamespace::hasGenderDistinction( NS_MAIN ) );
575 $this->assertFalse( MWNamespace::hasGenderDistinction( NS_TALK ) );
576
577 }
578
579 public function testIsNonincludable() {
580 global $wgNonincludableNamespaces;
581 $wgNonincludableNamespaces = array( NS_USER );
582
583 $this->assertTrue( MWNamespace::isNonincludable( NS_USER ) );
584
585 $this->assertFalse( MWNamespace::isNonincludable( NS_TEMPLATE ) );
586 }
587
588 ####### HELPERS ###########################################################
589 function __call( $method, $args ) {
590 // Call the real method if it exists
591 if( method_exists($this, $method ) ) {
592 return $this->$method( $args );
593 }
594
595 if( preg_match( '/^assert(Has|Is|Can)(Not|)(Subject|Talk|Watchable|Content|Subpages|Capitalized)$/', $method, $m ) ) {
596 # Interprets arguments:
597 $ns = $args[0];
598 $msg = isset($args[1]) ? $args[1] : " dummy message";
599
600 # Forge the namespace constant name:
601 if( $ns === 0 ) {
602 $ns_name = "NS_MAIN";
603 } else {
604 $ns_name = "NS_" . strtoupper( MWNamespace::getCanonicalName( $ns ) );
605 }
606 # ... and the MWNamespace method name
607 $nsMethod = strtolower( $m[1] ) . $m[3];
608
609 $expect = ($m[2] === '');
610 $expect_name = $expect ? 'TRUE' : 'FALSE';
611
612 return $this->assertEquals( $expect,
613 MWNamespace::$nsMethod( $ns, $msg ),
614 "MWNamespace::$nsMethod( $ns_name ) should returns $expect_name"
615 );
616 }
617
618 throw new Exception( __METHOD__ . " could not find a method named $method\n" );
619 }
620
621 function assertSameSubject( $ns1, $ns2, $msg = '' ) {
622 $this->assertTrue( MWNamespace::subjectEquals( $ns1, $ns2, $msg ) );
623 }
624 function assertDifferentSubject( $ns1, $ns2, $msg = '' ) {
625 $this->assertFalse( MWNamespace::subjectEquals( $ns1, $ns2, $msg ) );
626 }
627 }
628