Esempio n. 1
0
 public function testGetTooltipCreatesTooltipBlock()
 {
     $this->_model->setData(['tooltip_block' => 'Magento\\Config\\Block\\Tooltip'], 'scope');
     $tooltipBlock = $this->getMock('Magento\\Framework\\View\\Element\\BlockInterface');
     $tooltipBlock->expects($this->once())->method('toHtml')->will($this->returnValue('tooltip block'));
     $this->_blockFactoryMock->expects($this->once())->method('createBlock')->with('Magento\\Config\\Block\\Tooltip')->will($this->returnValue($tooltipBlock));
     $this->assertEquals('tooltip block', $this->_model->getTooltip());
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function getTooltip()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTooltip');
     if (!$pluginInfo) {
         return parent::getTooltip();
     } else {
         return $this->___callPlugins('getTooltip', func_get_args(), $pluginInfo);
     }
 }