public function testGetLocaleFileName()
 {
     $params = ['area' => 'some_area', 'themeModel' => $this->getMock('Magento\\Framework\\View\\Design\\ThemeInterface', [], [], '', false, false), 'locale' => 'some_locale'];
     $file = 'some_file.ext';
     $expected = 'path/to/some_file.ext';
     $this->_localeFileResolution->expects($this->once())->method('getFile')->with($params['area'], $params['themeModel'], $params['locale'], 'some_file.ext')->will($this->returnValue($expected));
     $actual = $this->_model->getLocaleFileName($file, $params);
     $this->assertEquals($expected, $actual);
 }
Beispiel #2
0
 /**
  * Retrieve translation file for theme
  *
  * @param string $locale
  * @return string
  */
 protected function _getThemeTranslationFile($locale)
 {
     return $this->_viewFileSystem->getLocaleFileName(
         'i18n' . '/' . $locale . '.csv',
         ['area' => $this->getConfig('area')]
     );
 }