Foxtrott has submitted this change and it was merged.
Change subject: Fix tests for Win and for short URLs
......................................................................
Fix tests for Win and for short URLs
Change-Id: I5fbf25e541a082f4588fad1c0474e86f616e0c13
---
M tests/phpunit/Hooks/SetupAfterCacheTest.php
M tests/phpunit/Menu/MenuFromLinesTest.php
2 files changed, 7 insertions(+), 3 deletions(-)
Approvals:
Foxtrott: Verified; Looks good to me, approved
diff --git a/tests/phpunit/Hooks/SetupAfterCacheTest.php
b/tests/phpunit/Hooks/SetupAfterCacheTest.php
index 401b161..43dd9fe 100644
--- a/tests/phpunit/Hooks/SetupAfterCacheTest.php
+++ b/tests/phpunit/Hooks/SetupAfterCacheTest.php
@@ -227,7 +227,7 @@
->disableOriginalConstructor()
->getMock();
- $IP = dirname( dirname( dirname( dirname( dirname( __DIR__ ) )
) ) );
+ $IP = str_replace( DIRECTORY_SEPARATOR, '/', realpath( __DIR__
. '/../../../../../' ) );
$defaultConfiguration = array(
'IP' => $IP,
diff --git a/tests/phpunit/Menu/MenuFromLinesTest.php
b/tests/phpunit/Menu/MenuFromLinesTest.php
index 454e455..2329ea9 100644
--- a/tests/phpunit/Menu/MenuFromLinesTest.php
+++ b/tests/phpunit/Menu/MenuFromLinesTest.php
@@ -71,9 +71,13 @@
'* Test | Bar',
);
- $sp = $GLOBALS[ 'wgScriptPath' ];
+ $ap = $GLOBALS[ 'wgArticlePath' ];
- $expected = "<ul><li><a
href=\"$sp/index.php/Foo\">Foo</a><ul><li><a
href=\"$sp/index.php/FooBar\">FooBar</a><ul><li><a
href=\"$sp/index.php/FooBarBaz\">FooBarBaz</a></li></ul></li></ul></li><li><a
href=\"$sp/index.php/Test\">Bar</a></li></ul>";
+ $expected = '<ul><li><a href="' . str_replace( '$1', 'Foo', $ap
) .
+ '">Foo</a><ul><li><a href="' . str_replace( '$1',
'FooBar', $ap ) .
+ '">FooBar</a><ul><li><a href="' . str_replace( '$1',
'FooBarBaz', $ap ) .
+ '">FooBarBaz</a></li></ul></li></ul></li><li><a href="'
. str_replace( '$1', 'Test', $ap ) .
+ '">Bar</a></li></ul>';
/** @var MenuFromLines $instance */
$instance = new MenuFromLines( $lines, true );
--
To view, visit https://gerrit.wikimedia.org/r/172207
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5fbf25e541a082f4588fad1c0474e86f616e0c13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/chameleon
Gerrit-Branch: master
Gerrit-Owner: Foxtrott <[email protected]>
Gerrit-Reviewer: Foxtrott <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits