Example #1
0
 /**
  * @magentoDataFixture Mage/Catalog/_files/product_simple.php
  */
 public function testGetSetAttributes()
 {
     $product = new Mage_Catalog_Model_Product();
     $product->load(1);
     // fixture
     $attributes = $this->_model->getSetAttributes($product);
     $this->assertArrayHasKey('sku', $attributes);
     $this->assertArrayHasKey('name', $attributes);
     foreach ($attributes as $attribute) {
         $this->assertInstanceOf('Mage_Catalog_Model_Resource_Eav_Attribute', $attribute);
     }
     /* possibility of fatal error if passing null instead of product */
 }