saper has uploaded a new change for review.
https://gerrit.wikimedia.org/r/173221
Change subject: ImportTest should not depend on allow_url_fopen=1
......................................................................
ImportTest should not depend on allow_url_fopen=1
Change-Id: I4f755effd5f7bbbd7c704fe3b37322b6c92fac9b
---
M tests/phpunit/includes/ImportTest.php
1 file changed, 3 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/21/173221/1
diff --git a/tests/phpunit/includes/ImportTest.php
b/tests/phpunit/includes/ImportTest.php
index 678c89b..fc7a1ae 100644
--- a/tests/phpunit/includes/ImportTest.php
+++ b/tests/phpunit/includes/ImportTest.php
@@ -9,13 +9,8 @@
*/
class ImportTest extends MediaWikiLangTestCase {
- private function getInputStreamSource( $xml ) {
- $file = 'data:application/xml,' . $xml;
- $status = ImportStreamSource::newFromFile( $file );
- if ( !$status->isGood() ) {
- throw new MWException( "Cannot create
InputStreamSource." );
- }
- return $status->value;
+ private function getDataSource( $xml ) {
+ return new ImportStringSource( $xml );
}
/**
@@ -25,7 +20,7 @@
* @param string|null $redirectTitle
*/
public function testHandlePageContainsRedirect( $xml, $redirectTitle ) {
- $source = $this->getInputStreamSource( $xml );
+ $source = $this->getDataSource( $xml );
$redirect = null;
$callback = function ( $title, $origTitle, $revCount,
$sRevCount, $pageInfo ) use ( &$redirect ) {
--
To view, visit https://gerrit.wikimedia.org/r/173221
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f755effd5f7bbbd7c704fe3b37322b6c92fac9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: saper <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits