This repository was archived by the owner on May 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,20 @@ public static function applyTestScope()
134134 EcomDev_Utils_Reflection::setRestrictedPropertyValue ('Mage ' , '_registry ' , array ());
135135
136136 // All unit tests will be run in admin scope, to get rid of frontend restrictions
137- Mage::app ()->initTest ();
137+ // Init modules runs install process for table structures,
138+ // It is required for setting up proper setup script
139+ try {
140+ set_error_handler (function ($ errorCode , $ errorMessage ) {
141+ echo $ errorMessage , $ errorCode ;
142+ debug_print_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS );
143+ exit ;
144+ });
145+ Mage::app ()->initTest ();
146+ restore_error_handler ();
147+ } catch (Exception $ e ) {
148+ echo $ e ->getMessage (), "\n" , $ e ->getTraceAsString ();
149+ exit ;
150+ }
138151 }
139152
140153 /**
@@ -383,7 +396,6 @@ public function getResponse()
383396 protected function _getClassNameFromConfig ($ configPath , $ interface = null )
384397 {
385398 $ className = (string )$ this ->getConfig ()->getNode ($ configPath );
386-
387399 $ reflection = EcomDev_Utils_Reflection::getReflection ($ className );
388400 if ($ interface !== null && !$ reflection ->implementsInterface ($ interface )) {
389401 throw new RuntimeException (
Original file line number Diff line number Diff line change 66 "homepage" : " http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html" ,
77 "require" : {
88 "magento-hackathon/magento-composer-installer" : " *" ,
9- "phpunit/phpunit" : " 4.1. *"
9+ "phpunit/phpunit" : " 4.*"
1010 },
1111 "replace" : {
1212 "ivanchepurnyi/ecomdev_phpunit" :" *"
You can’t perform that action at this time.
0 commit comments