Index: trunk/phase3/maintenance/tests/phpunit/includes/TitleTest.php |
— | — | @@ -21,18 +21,17 @@ |
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Test originally wrote to investigate bug 24343 |
25 | | - * FIXME : some tests might fail depending on local settings. |
26 | 25 | */ |
27 | 26 | function testGetURLS() { |
28 | | - global $wgArticlePath, $wgScript; |
29 | | - |
| 27 | + global $wgArticlePath; |
| 28 | + |
30 | 29 | $title = Title::newFromText( 'User:Bob#section' ); |
31 | | - |
32 | | - $this->assertEquals( "$wgScript/User:Bob", $title->getLocalURL(), |
| 30 | + |
| 31 | + $this->assertEquals( str_replace( '$1', 'User:Bob', $wgArticlePath ), $title->getLocalURL(), |
33 | 32 | 'Title::getLocalURL() does NOT have fragment' ); |
34 | | - $this->assertEquals( "$wgScript/User:Bob", $title->escapeLocalURL(), |
| 33 | + $this->assertEquals( str_replace( '$1', 'User:Bob', $wgArticlePath ), $title->escapeLocalURL(), |
35 | 34 | 'Title::escapeLocalURL() does NOT have fragment' ); |
36 | | - $this->assertEquals( "$wgScript/User:Bob#section", $title->getLinkURL(), |
| 35 | + $this->assertEquals( str_replace( '$1', 'User:Bob#section', $wgArticlePath ), $title->getLinkURL(), |
37 | 36 | 'Title::getLinkURL() does have fragment' ); |
38 | 37 | |
39 | 38 | #$this->assertEquals( 'toto', $title->getFullURL() ); |