Example #1
0
 public function testGetTooltipCreatesTooltipBlock()
 {
     $this->_model->setData(array('tooltip_block' => 'Magento\\Core\\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\\Core\\Block\\Tooltip')->will($this->returnValue($tooltipBlock));
     $this->assertEquals('tooltip block', $this->_model->getTooltip());
 }