示例#1
0
 public function testGetTemplateFilterWithEmptyValue()
 {
     $filterTemplate = $this->getMockBuilder('Magento\\Framework\\Filter\\Template')->setMethods(['setUseAbsoluteLinks', 'setStoreId'])->disableOriginalConstructor()->getMock();
     $filterTemplate->expects($this->once())->method('setUseAbsoluteLinks')->will($this->returnSelf());
     $filterTemplate->expects($this->once())->method('setStoreId')->will($this->returnSelf());
     $this->filterFactory->method('create')->will($this->returnValue($filterTemplate));
     $designConfig = $this->getMockBuilder('Magento\\Framework\\Object')->setMethods(['getStore'])->disableOriginalConstructor()->getMock();
     $model = $this->getModelMock(['getUseAbsoluteLinks', 'getDesignConfig']);
     $model->expects($this->once())->method('getDesignConfig')->will($this->returnValue($designConfig));
     $this->assertSame($filterTemplate, $model->getTemplateFilter());
 }