Esempio n. 1
0
 public function testGetIdentities()
 {
     $productTag = ['compare_item_1'];
     $product = $this->getMock('Magento\\Catalog\\Model\\Product', [], [], '', false);
     $product->expects($this->once())->method('getIdentities')->will($this->returnValue($productTag));
     $itemsCollection = new \ReflectionProperty('Magento\\Catalog\\Block\\Product\\ProductList\\Upsell', '_items');
     $itemsCollection->setAccessible(true);
     $itemsCollection->setValue($this->block, [$product]);
     $this->assertEquals($productTag, $this->block->getIdentities());
 }
 /**
  * {@inheritdoc}
  */
 public function getIdentities()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getIdentities');
     if (!$pluginInfo) {
         return parent::getIdentities();
     } else {
         return $this->___callPlugins('getIdentities', func_get_args(), $pluginInfo);
     }
 }