diff --git a/app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/Eav/Abstract.php b/app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/Eav/Abstract.php index c767258d..38368fa2 100644 --- a/app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/Eav/Abstract.php +++ b/app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/Eav/Abstract.php @@ -61,6 +61,7 @@ public function runRequiredIndexers() $process = $indexer->getProcessByCode($indexerCode); if ($process) { $process->reindexAll(); + Mage::dispatchEvent($indexerCode . '_shell_reindex_after'); } } } diff --git a/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php b/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php index e222e11d..90fff349 100644 --- a/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php +++ b/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php @@ -1977,6 +1977,8 @@ protected function reset() $this->getResponse()->reset(); $this->getLayout()->reset(); + $this->app()->resetAreas(); + return $this; } diff --git a/app/code/community/EcomDev/PHPUnit/Test/Case/Util.php b/app/code/community/EcomDev/PHPUnit/Test/Case/Util.php index c72928c4..46030a76 100644 --- a/app/code/community/EcomDev/PHPUnit/Test/Case/Util.php +++ b/app/code/community/EcomDev/PHPUnit/Test/Case/Util.php @@ -396,7 +396,7 @@ public static function getModuleNameByClassName($className) // Try to find the module name by class name $moduleName = false; foreach (Mage::getConfig()->getNode('modules')->children() as $module) { - if (strpos($className, $module->getName()) === 0) { + if (strpos($className, $module->getName() . '_') === 0) { $moduleName = $module->getName(); break; } diff --git a/app/code/community/EcomDev/PHPUnit/bootstrap.php b/app/code/community/EcomDev/PHPUnit/bootstrap.php index 663d593e..3f6fdf23 100644 --- a/app/code/community/EcomDev/PHPUnit/bootstrap.php +++ b/app/code/community/EcomDev/PHPUnit/bootstrap.php @@ -39,3 +39,8 @@ . ".php"; @include_once $classname; }); + +// workaround for __autoload in Mage/Core/functions.php +spl_autoload_register(function ($class) { + class_alias('Varien_Object', $class); +});