Ejemplo n.º 1
0
 protected function setUp()
 {
     $attribute = new Mage_Catalog_Model_Entity_Attribute();
     $attribute->loadByCode('catalog_product', 'attribute_with_option');
     foreach ($attribute->getSource()->getAllOptions() as $optionInfo) {
         if ($optionInfo['label'] == 'Option Label') {
             $this->_attributeOptionId = $optionInfo['value'];
             break;
         }
     }
     $this->_model = new Mage_Catalog_Model_Layer_Filter_Attribute();
     $this->_model->setData(array('layer' => new Mage_Catalog_Model_Layer(), 'attribute_model' => $attribute));
 }