コード例 #1
0
 /**
  * @magentoDataFixture Mage/Catalog/controllers/_files/attribute_system_with_applyto_data.php
  */
 public function testSaveActionApplyToData()
 {
     $postData = $this->_getAttributeData() + array('attribute_id' => '3');
     unset($postData['apply_to']);
     $this->getRequest()->setPost($postData);
     $this->dispatch('backend/admin/catalog_product_attribute/save');
     $model = new Mage_Catalog_Model_Resource_Eav_Attribute(new Mage_Core_Model_Event_Manager(), new Mage_Core_Model_Cache());
     $model->load($postData['attribute_id']);
     $this->assertEquals(array('simple', 'configurable'), $model->getApplyTo());
 }