Zookal / magento-mock

Transparent auto detecting of disabled core modules and providing mock objects for not breaking Magento.
46 stars 13 forks source link

Enterprise_Websiterestriction helper mock #6

Closed heldchen closed 9 years ago

heldchen commented 9 years ago

i have disabled the Enterprise_Websiterestriction extension, yet some of the enterprise core code (f.e. the FPC crawler) is using its helper: Mage::helper('enterprise_websiterestriction')->getIsRestrictionEnabled($store)

this results in error messages like the following:

2015-02-01T02:10:01+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Enterprise/Websiterestriction/Helper/Data.php' for inclusion (include_path='/srv/httpd/prod/src/www/app/code/local:/srv/httpd/prod/src/www/app/code/community:/srv/httpd/prod/src/www/app/code/core:/srv/httpd/prod/src/www/lib:.:/usr/share/pear:/usr/share/php') in /srv/httpd/prod/src/www/lib/Varien/Autoload.php on line 94

as there seems no mock classes for enterprise functionalities currently in magento-mock, i'd appreciate pointers on how to add a mock for the above helper class so i can create a PR - so far i've not been successful.

heldchen commented 9 years ago

actually, i just found out that creating a Mage_Enterprise_Websiterestriction_Helper_Data class in Model/Mocks/Mage/Enterprise/Websiterestriction/Helper/Data.php seems to do the trick.

SchumacherFM commented 9 years ago

Thanks!