netz98/n98-magerun — pull request #389 by AydinHassan (2014-08-26 20:48:53+00:00)
Title: Fix attribute removal for other entity types

The validation on this command was wrong, I was doing to much validation on the entity type code, so I couldn't remove attributes on `order` , `customer` entity type etc.

Also looks like there is maybe a bug in Magento:

The code:
`\Mage::getModel('eav/config')->getAttribute('order', 'someAttribute');`

Results in the following:

```
Fatal error: Call to undefined method Mage_Sales_Model_Resource_Order::getDefaultAttributes() in /var/www/magento/htdocs/app/code/core/Mage/Eav/Model/Config.php on line 429
```

That method is called in [here](https://github.com/OpenMage/magento-mirror/blob/magento-1.9/app/code/core/Mage/Eav/Model/Config.php#L429)

Anyway - I fixed it by using `getEntityAttributeCodes` and checking for existence in array instead.

I enhanced the tests to create and remove an attribute for each entity type.