Last modified: 2014-11-14 01:01:30 UTC
2) ImportTest::testHandlePageContainsRedirect with data set #1 ('<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.9/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.9/ http://www.mediawiki.org/xml/export-0.9.xsd" version="0.9" xml:lang="en"> <page> <title>Test</title> <ns>0</ns> <id>42</id> <revision> <id>421</id> <timestamp>2014-05-27T11:00:00Z</timestamp> <contributor> <username>Admin</username> <id>10</id> </contributor> <text xml:space="preserve" bytes="4">Abcd</text> <sha1>n7uomjq96szt60fy5w3x7ahf7q8m8rh</sha1> <model>wikitext</model> <format>text/x-wiki</format> </revision> </page> </mediawiki>', NULL) MWException: Cannot create InputStreamSource. /usr/home/saper/public_html/pg/w/tests/phpunit/includes/ImportTest.php:16 /usr/home/saper/public_html/pg/w/tests/phpunit/includes/ImportTest.php:28 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestCase.php:976 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestCase.php:831 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestResult.php:648 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestCase.php:776 /usr/home/saper/public_html/pg/w/tests/phpunit/MediaWikiTestCase.php:141 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestSuite.php:775 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestSuite.php:745 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestSuite.php:705 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestSuite.php:705 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/Framework/TestSuite.php:705 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/TextUI/TestRunner.php:349 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/TextUI/Command.php:176 phar:///usr/share/php/phpunit/phpunit.phar/PHPUnit/TextUI/Command.php:129 /usr/share/php/phpunit/phpunit.phar:531 May be related to bug 72214, but that's a different message
Simple smoke test is failing here (need to have Gerrit change #156446 installed to use print not print_r): > print ImportStreamSource::newFromFile('data:application/xml,<xml><p>Hi</p></xml>'); <Error, collected 1 error(s) on the way, no value set> +------+---------------------------+------------------------------------------+ | 1 | importcantopen | | +------+---------------------------+------------------------------------------+
So this was caused by Gerrit change #134079 which introduced "Import Testing". This little thing now requires the use of fopen() with stream wrappers, data URL and .... "allow_url_open" set to "On" Do we require allow_url_open to be enabled now? It seems to be an overkill for some simple thing like providing a test string to an XML parser. But here I think a monster thing called includes/Import.php is to blame
Change 172657 had a related patch set uploaded by saper: Skip ImportTest if allow_url_fopen disabled https://gerrit.wikimedia.org/r/172657
Change 173222 had a related patch set uploaded by saper: Use ImportStringSource for simple import sources https://gerrit.wikimedia.org/r/173222
Change 173222 abandoned by saper: Use ImportStringSource for simple import sources Reason: Wrongly submitted https://gerrit.wikimedia.org/r/173222
Change 173223 had a related patch set uploaded by saper: Use ImportStringSource for simple import sources https://gerrit.wikimedia.org/r/173223