/**
  * Resolver get template file name test
  *
  * @return void
  */
 public function testGetTemplateFileName()
 {
     $template = 'template.phtml';
     $this->_viewFileSystemMock->expects($this->once())->method('getTemplateFileName')->with($template)->will($this->returnValue('path_to' . $template));
     $this->assertEquals('path_to' . $template, $this->_resolver->getTemplateFileName($template));
     $this->assertEquals('path_to' . $template, $this->_resolver->getTemplateFileName($template));
 }
Beispiel #2
0
 public function testGetTemplateFile()
 {
     $params = ['module' => 'Fixture_Module', 'area' => 'frontend'];
     $this->_resolver->expects($this->once())->method('getTemplateFileName')->with('template.phtml', $params);
     $this->_block->getTemplateFile();
 }
 /**
  * Get absolute path to template
  *
  * @param string|null $template
  * @return string
  */
 public function getTemplateFile($template = null)
 {
     $params = ['module' => $this->getModuleName()];
     $area = $this->getArea();
     if ($area) {
         $params['area'] = $area;
     }
     return $this->resolver->getTemplateFileName($template ?: $this->getTemplate(), $params);
 }