http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74120
Revision: 74120
Author: platonides
Date: 2010-10-01 22:59:04 +0000 (Fri, 01 Oct 2010)
Log Message:
-----------
Follow up r73976. Made the test do not depend on $wgUsePathInfo being true and
$wgArticlePath the default.
Modified Paths:
--------------
trunk/phase3/maintenance/tests/phpunit/includes/TitleTest.php
Modified: trunk/phase3/maintenance/tests/phpunit/includes/TitleTest.php
===================================================================
--- trunk/phase3/maintenance/tests/phpunit/includes/TitleTest.php
2010-10-01 22:45:08 UTC (rev 74119)
+++ trunk/phase3/maintenance/tests/phpunit/includes/TitleTest.php
2010-10-01 22:59:04 UTC (rev 74120)
@@ -21,18 +21,17 @@
/**
* 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() );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs