Ejemplo n.º 1
0
 public function testGetAttributes()
 {
     $typeId = 1;
     $linkAttributes = ['link_type_id' => 1, 'product_link_attribute_code' => 1, 'data_type' => 'int', 'id' => 1];
     $this->resource->expects($this->any())->method('getAttributesByType')->with($typeId)->will($this->returnValue($linkAttributes));
     $this->model->setData('link_type_id', $typeId);
     $this->assertEquals($linkAttributes, $this->model->getAttributes());
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getAttributes($type = null)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getAttributes');
     if (!$pluginInfo) {
         return parent::getAttributes($type);
     } else {
         return $this->___callPlugins('getAttributes', func_get_args(), $pluginInfo);
     }
 }