From ed895f712d3d5015ea0cd57b65b38e67e4b3892c Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 1 Oct 2010 22:59:04 +0000 Subject: [PATCH] Follow up r73976. Made the test do not depend on $wgUsePathInfo being true and $wgArticlePath the default. --- maintenance/tests/phpunit/includes/TitleTest.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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() ); -- 2.20.1