/**
  * Import attributesets
  *
  * @param Aoe_AttributeConfigurator_Model_Config $config Config model
  * @return void
  */
 public function run($config)
 {
     $iterator = Mage::getModel('aoe_attributeconfigurator/config_attributeset_iterator', $config->getAttributeSets());
     foreach ($iterator as $_attributeSetConfig) {
         /** @var Aoe_AttributeConfigurator_Model_Config_Attributeset $_attributeSetConfig */
         try {
             $this->_processAttributeSet($_attributeSetConfig);
         } catch (Aoe_AttributeConfigurator_Model_Sync_Import_Attributeset_Validation_Exception $e) {
             $this->_getHelper()->log('Attribute Set validation exception.', $e);
         } catch (Aoe_AttributeConfigurator_Model_Sync_Import_Attributeset_Creation_Exception $e) {
             $this->_getHelper()->log('Attribute Set could not be saved.', $e);
         } catch (Exception $e) {
             $this->_getHelper()->log('Unexpected Attribute Set Error, skipping.', $e);
         }
     }
 }
 /**
  * @test
  * @depends checkClass
  * @param Aoe_AttributeConfigurator_Model_Config $model Config model
  * @return void
  */
 public function checkGetAttributeSet($model)
 {
     $this->_mockConfigHelperLoadingXml();
     $attributeSets = $model->getAttributeSets();
     $this->assertInstanceOf('Varien_Simplexml_Element', $attributeSets);
 }