r74120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74119‎ | r74120 | r74121 >
Date:22:59, 1 October 2010
Author:platonides
Status:reverted
Tags:
Comment:
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) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/phpunit/includes/TitleTest.php
@@ -21,18 +21,17 @@
2222
2323 /**
2424 * Test originally wrote to investigate bug 24343
25 - * FIXME : some tests might fail depending on local settings.
2625 */
2726 function testGetURLS() {
28 - global $wgArticlePath, $wgScript;
29 -
 27+ global $wgArticlePath;
 28+
3029 $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(),
3332 '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(),
3534 '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(),
3736 'Title::getLinkURL() does have fragment' );
3837
3938 #$this->assertEquals( 'toto', $title->getFullURL() );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73976Implements bug 24343 "localurl discards section id"....hashar19:51, 29 September 2010

Status & tagging log