Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Wrong Modulename detection in \EcomDev_PHPUnit_Model_App::getModuleNameByClassName #101

Open
sgrund opened this issue Apr 24, 2013 · 3 comments

Comments

@sgrund
Copy link

sgrund commented Apr 24, 2013

Modulename detection is not working correctly when Modules like these exists:

N98_Catalog
N98_CatalogGrouped

        foreach ($this->getConfig()->getNode('modules')->children() as $module) {
            if (strpos($className, $module->getName()) === 0) {
               $moduleName = $module->getName();
               break;
            }
        }

By using strpos, the function will always return N98_Catalog.

@kezek
Copy link

kezek commented May 7, 2013

This should be :

if (strpos($className, $module->getName() . '_' ) === 0)

@IvanChepurnyi
Copy link
Member

@kezek Can you please create it as a pull request to dev branch, so you input will be mentioned in the contributions on github?

@kezek
Copy link

kezek commented Aug 13, 2013

Sorry Ivan , was away during that time but I see Sebastian took care of it so it's all good. Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants