예제 #1
0
 /**
  * Test the basic render action.
  */
 public function testRender()
 {
     $expectedResult = '<a href="http://magento.loc/linkurl" title="Link Caption">Link Caption</a>';
     $column = $this->getMockBuilder('Magento\\Backend\\Block\\Widget\\Grid\\Column')->disableOriginalConstructor()->setMethods(['getCaption', 'getId'])->getMock();
     $column->expects($this->any())->method('getCaption')->will($this->returnValue('Link Caption'));
     $column->expects($this->any())->method('getId')->willReturn('1');
     $this->linkRenderer->setColumn($column);
     $object = new \Magento\Framework\DataObject(['id' => '1']);
     $actualResult = $this->linkRenderer->render($object);
     $this->assertEquals($expectedResult, $actualResult);
 }
예제 #2
0
 /**
  * {@inheritDoc}
  */
 protected function _getAttributes()
 {
     return array_merge(parent::_getAttributes(), ['onclick' => 'integration.popup.show(this);']);
 }