This repository was archived by the owner on May 27, 2023. It is now read-only.
File tree 2 files changed +15
-3
lines changed
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()
134
134
EcomDev_Utils_Reflection::setRestrictedPropertyValue ('Mage ' , '_registry ' , array ());
135
135
136
136
// 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
+ }
138
151
}
139
152
140
153
/**
@@ -383,7 +396,6 @@ public function getResponse()
383
396
protected function _getClassNameFromConfig ($ configPath , $ interface = null )
384
397
{
385
398
$ className = (string )$ this ->getConfig ()->getNode ($ configPath );
386
-
387
399
$ reflection = EcomDev_Utils_Reflection::getReflection ($ className );
388
400
if ($ interface !== null && !$ reflection ->implementsInterface ($ interface )) {
389
401
throw new RuntimeException (
Original file line number Diff line number Diff line change 6
6
"homepage" : " http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html" ,
7
7
"require" : {
8
8
"magento-hackathon/magento-composer-installer" : " *" ,
9
- "phpunit/phpunit" : " 4.1. *"
9
+ "phpunit/phpunit" : " 4.*"
10
10
},
11
11
"replace" : {
12
12
"ivanchepurnyi/ecomdev_phpunit" :" *"
You can’t perform that action at this time.
0 commit comments