From: Platonides Date: Fri, 1 Oct 2010 22:59:04 +0000 (+0000) Subject: Follow up r73976. Made the test do not depend on $wgUsePathInfo being true and $wgArt... X-Git-Tag: 1.31.0-rc.0~34690 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=ed895f712d3d5015ea0cd57b65b38e67e4b3892c;p=lhc%2Fweb%2Fwiklou.git Follow up r73976. Made the test do not depend on $wgUsePathInfo being true and $wgArticlePath the default. --- diff --git a/maintenance/tests/phpunit/includes/TitleTest.php b/maintenance/tests/phpunit/includes/TitleTest.php index 6ea1925a3b..cef47a9fa1 100644 --- a/maintenance/tests/phpunit/includes/TitleTest.php +++ b/maintenance/tests/phpunit/includes/TitleTest.php @@ -21,18 +21,17 @@ class TitleTest extends PHPUnit_Framework_TestCase { /** * Test originally wrote to investigate bug 24343 - * FIXME : some tests might fail depending on local settings. */ function testGetURLS() { - global $wgArticlePath, $wgScript; - + global $wgArticlePath; + $title = Title::newFromText( 'User:Bob#section' ); - - $this->assertEquals( "$wgScript/User:Bob", $title->getLocalURL(), + + $this->assertEquals( str_replace( '$1', 'User:Bob', $wgArticlePath ), $title->getLocalURL(), 'Title::getLocalURL() does NOT have fragment' ); - $this->assertEquals( "$wgScript/User:Bob", $title->escapeLocalURL(), + $this->assertEquals( str_replace( '$1', 'User:Bob', $wgArticlePath ), $title->escapeLocalURL(), 'Title::escapeLocalURL() does NOT have fragment' ); - $this->assertEquals( "$wgScript/User:Bob#section", $title->getLinkURL(), + $this->assertEquals( str_replace( '$1', 'User:Bob#section', $wgArticlePath ), $title->getLinkURL(), 'Title::getLinkURL() does have fragment' ); #$this->assertEquals( 'toto', $title->getFullURL() );