From 3e0ff7eb56c6c0d916ebae0b8ce6ab61540ceb31 Mon Sep 17 00:00:00 2001 From: Sebastian Grund <s.grund@netz98.de> Date: Mon, 10 Jun 2013 09:07:30 +0200 Subject: [PATCH 1/4] Fixed #101: getModuleNameByClassName evaluation when Modules with similar names exists. --- app/code/community/EcomDev/PHPUnit/Test/Case/Util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/community/EcomDev/PHPUnit/Test/Case/Util.php b/app/code/community/EcomDev/PHPUnit/Test/Case/Util.php index 86165f66..2c41bbeb 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; } From 40ed66176a034cfdaeddd9e07761b02b7315ddc3 Mon Sep 17 00:00:00 2001 From: Sebastian Grund <s.grund@netz98.de> Date: Wed, 10 Jul 2013 12:11:41 +0200 Subject: [PATCH 2/4] Fixed issue #117 --- app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php b/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php index c5f1399e..96b19931 100644 --- a/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php +++ b/app/code/community/EcomDev/PHPUnit/Test/Case/Controller.php @@ -1910,6 +1910,8 @@ protected function reset() $this->getResponse()->reset(); $this->getLayout()->reset(); + $this->app()->resetAreas(); + return $this; } From 85b4d4b3c1bedf83813756343ed1ab64a2bd6517 Mon Sep 17 00:00:00 2001 From: Sebastian Grund <s.grund@netz98.de> Date: Wed, 10 Jul 2013 15:16:34 +0200 Subject: [PATCH 3/4] Fixed class not found error for: __autoload in Mage/Core/functions.php --- app/code/community/EcomDev/PHPUnit/bootstrap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/community/EcomDev/PHPUnit/bootstrap.php b/app/code/community/EcomDev/PHPUnit/bootstrap.php index 8183ea54..92bd71b8 100644 --- a/app/code/community/EcomDev/PHPUnit/bootstrap.php +++ b/app/code/community/EcomDev/PHPUnit/bootstrap.php @@ -33,3 +33,8 @@ . ".php"; @include_once $classname; }); + +// workaround for __autoload in Mage/Core/functions.php +spl_autoload_register(function ($class) { + class_alias('Varien_Object', $class); +}); From 4f694ff8c610bebd7f1128e5450d32f6cf591b5d Mon Sep 17 00:00:00 2001 From: Sebastian Grund <s.grund@netz98.de> Date: Wed, 16 Oct 2013 17:02:54 +0200 Subject: [PATCH 4/4] Fixed fixed indexer for magento 1.13.x.x --- .../EcomDev/PHPUnit/Model/Mysql4/Fixture/Eav/Abstract.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 4f547ca7..9c8bf58c 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 @@ -60,7 +60,8 @@ public function runRequiredIndexers() if (empty($this->_options['doNotIndex']) || !in_array($indexerCode, $this->_options['doNotIndex'])) { $indexer->getProcessByCode($indexerCode) - ->reindexAll(); + ->reindexEverything(); + Mage::dispatchEvent($indexerCode . '_shell_reindex_after'); } } }