Commit e0b35954 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

Fix error reporting for issues happining during setup process, lift phpunit version to major one

parent 68bfe5b3
......@@ -134,7 +134,20 @@ class EcomDev_PHPUnit_Model_App extends Mage_Core_Model_App
EcomDev_Utils_Reflection::setRestrictedPropertyValue('Mage', '_registry', array());
// All unit tests will be run in admin scope, to get rid of frontend restrictions
Mage::app()->initTest();
// Init modules runs install process for table structures,
// It is required for setting up proper setup script
try {
set_error_handler(function ($errorCode, $errorMessage) {
echo $errorMessage, $errorCode;
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
exit;
});
Mage::app()->initTest();
restore_error_handler();
} catch (Exception $e) {
echo $e->getMessage(), "\n", $e->getTraceAsString();
exit;
}
}
/**
......@@ -383,7 +396,6 @@ class EcomDev_PHPUnit_Model_App extends Mage_Core_Model_App
protected function _getClassNameFromConfig($configPath, $interface = null)
{
$className = (string)$this->getConfig()->getNode($configPath);
$reflection = EcomDev_Utils_Reflection::getReflection($className);
if ($interface !== null && !$reflection->implementsInterface($interface)) {
throw new RuntimeException(
......
......@@ -6,7 +6,7 @@
"homepage": "http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html",
"require": {
"magento-hackathon/magento-composer-installer": "*",
"phpunit/phpunit": "4.1.*"
"phpunit/phpunit": "4.*"
},
"replace": {
"ivanchepurnyi/ecomdev_phpunit":"*"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment