public function testGetClearUrl()
 {
     $this->filterListMock->expects($this->any())->method('getFilters')->will($this->returnValue([]));
     $this->model->setLayout($this->layoutMock);
     $this->layoutMock->expects($this->once())->method('getChildName')->will($this->returnValue('sample block'));
     $blockMock = $this->getMockForAbstractClass('\\Magento\\Framework\\View\\Element\\AbstractBlock', [], '', false);
     $clearUrl = 'very clear URL';
     $blockMock->setClearUrl($clearUrl);
     $this->layoutMock->expects($this->once())->method('getBlock')->will($this->returnValue($blockMock));
     $this->assertEquals($clearUrl, $this->model->getClearUrl());
 }
Exemple #2
0
 /**
  * @SuppressWarnings(PHPMD.CamelCaseMethodName)
  *
  * {@inheritDoc}
  */
 protected function _prepareLayout()
 {
     parent::_prepareLayout();
     $this->addFacets();
     return $this;
 }