[wp-trac] [WordPress Trac] #27250: Exception when running import unit test group without the importer installed

WordPress Trac noreply at wordpress.org
Sat Mar 1 12:33:58 UTC 2014


#27250: Exception when running import unit test group without the importer
installed
-------------------------+-----------------------------
 Reporter:  mattheu      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Import       |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 When running the import unit test group without having the WordPress
 Importer installed, it throws an exception when trying to include the
 importer plugin files.

 I have made a patch that skips these tests if the plugin is not installed.

 {{{
 PHP Warning:  Uncaught exception 'PHPUnit_Framework_Error_Warning' with
 message 'require_once(/srv/www/wordpress-
 trunk.dev/tests/phpunit/includes/../data/plugins/wordpress-importer
 /wordpress-importer.php): failed to open stream: No such file or
 directory' in /srv/www/wordpress-
 trunk.dev/tests/phpunit/tests/import/import.php:17
 Stack trace:
 #0 /srv/www/wordpress-trunk.dev/tests/phpunit/tests/import/import.php(17):
 PHPUnit_Util_ErrorHandler::handleError(2, 'require_once(/s...',
 '/srv/www/wordpr...', 17, Array)
 #1 /srv/www/wordpress-trunk.dev/tests/phpunit/tests/import/import.php(17):
 Tests_Import_Import::setUp()
 #2 /usr/share/php/PHPUnit/Framework/TestCase.php(835):
 Tests_Import_Import->setUp()
 #3 /usr/share/php/PHPUnit/Framework/TestResult.php(648):
 PHPUnit_Framework_TestCase->runBare()
 #4 /usr/share/php/PHPUnit/Framework/TestCase.php(783):
 PHPUnit_Framework_TestResult->run(Object(Tests_Import_Import))
 #5 /usr/share/php/PHPUnit/Framework/TestSuite.php(775):
 PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult in
 /srv/www/wordpress-trunk.dev/tests/phpunit/tests/import/import.php on line
 17
 PHP Fatal error:  Tests_Import_Import::setUp(): Failed opening required
 '/srv/www/wordpress-trunk.dev/tests/phpunit/includes/../data/plugins
 /wordpress-importer/wordpress-importer.php'
 (include_path='.:/usr/share/php:/usr/share/pear') in /srv/www/wordpress-
 trunk.dev/tests/phpunit/tests/import/import.php on line 17

 Warning: Uncaught exception 'PHPUnit_Framework_Error_Warning' with message
 'require_once(/srv/www/wordpress-
 trunk.dev/tests/phpunit/includes/../data/plugins/wordpress-importer
 /wordpress-importer.php): failed to open stream: No such file or
 directory' in /srv/www/wordpress-
 trunk.dev/tests/phpunit/tests/import/import.php:17
 Stack trace:
 #0 /srv/www/wordpress-trunk.dev/tests/phpunit/tests/import/import.php(17):
 PHPUnit_Util_ErrorHandler::handleError(2, 'require_once(/s...',
 '/srv/www/wordpr...', 17, Array)
 #1 /srv/www/wordpress-trunk.dev/tests/phpunit/tests/import/import.php(17):
 Tests_Import_Import::setUp()
 #2 /usr/share/php/PHPUnit/Framework/TestCase.php(835):
 Tests_Import_Import->setUp()
 #3 /usr/share/php/PHPUnit/Framework/TestResult.php(648):
 PHPUnit_Framework_TestCase->runBare()
 #4 /usr/share/php/PHPUnit/Framework/TestCase.php(783):
 PHPUnit_Framework_TestResult->run(Object(Tests_Import_Import))
 #5 /usr/share/php/PHPUnit/Framework/TestSuite.php(775):
 PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult in
 /srv/www/wordpress-trunk.dev/tests/phpunit/tests/import/import.php on line
 17

 Fatal error: Tests_Import_Import::setUp(): Failed opening required
 '/srv/www/wordpress-trunk.dev/tests/phpunit/includes/../data/plugins
 /wordpress-importer/wordpress-importer.php'
 (include_path='.:/usr/share/php:/usr/share/pear') in /srv/www/wordpress-
 trunk.dev/tests/phpunit/tests/import/import.php on line 17
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27250>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list