Set $wgScript, $wgScriptPath and $wgResourceBasePath
to avoid failures when running on a wiki with
a non-standard $wgScriptPath.
Reported-on:
https://lists.wikimedia.org/pipermail/wikitech-l/2015-October/083675.html
Change-Id: I8acbcca5449060ff5604bf275f690b53343e706e
public function testUpdateRedirect( $oldText, $expectedText ) {
$this->setMwGlobals( array(
'wgServer' => '//example.org',
public function testUpdateRedirect( $oldText, $expectedText ) {
$this->setMwGlobals( array(
'wgServer' => '//example.org',
- 'wgScriptPath' => '/w/index.php',
+ 'wgScriptPath' => '/w',
+ 'wgScript' => '/w/index.php',
+ 'wgResourceBasePath' => '/w',
) );
$target = Title::newFromText( "testUpdateRedirect_target" );
) );
$target = Title::newFromText( "testUpdateRedirect_target" );
public function testGetRedirectTarget( $title, $text ) {
$this->setMwGlobals( array(
'wgServer' => '//example.org',
public function testGetRedirectTarget( $title, $text ) {
$this->setMwGlobals( array(
'wgServer' => '//example.org',
- 'wgScriptPath' => '/w/index.php',
+ 'wgScriptPath' => '/w',
+ 'wgScript' => '/w/index.php',
+ 'wgResourceBasePath' => '/w',
) );
$content = new JavaScriptContent( $text );
$target = $content->getRedirectTarget();
) );
$content = new JavaScriptContent( $text );
$target = $content->getRedirectTarget();