コード例 #1
0
ファイル: PathTest.php プロジェクト: shabbirvividads/magento2
 /**
  * @covers \Magento\Framework\View\Design\Theme\Customization\Path::getThemeFilesPath
  */
 public function testGetThemeFilesPath()
 {
     $this->_appState->expects($this->any())->method('getAreaCode')->will($this->returnValue('area51'));
     $expectedPath = implode('/', ['area51', 'path']);
     $this->assertEquals($expectedPath, $this->_model->getThemeFilesPath($this->_theme->setThemePath('path')));
     $this->assertNull($this->_model->getCustomizationPath($this->_theme->setThemePath(null)));
 }
コード例 #2
0
 /**
  * @covers \Magento\Framework\View\Design\Theme\Customization\Path::getThemeFilesPath
  */
 public function testGetThemeFilesPath()
 {
     $this->_theme->expects($this->any())->method('getFullPath')->will($this->returnValue('frontend/Magento/theme'));
     $expectedPath = '/fill/theme/path';
     $this->componentRegistrar->expects($this->once())->method('getPath')->with(ComponentRegistrar::THEME, 'frontend/Magento/theme')->will($this->returnValue($expectedPath));
     $this->assertEquals($expectedPath, $this->_model->getThemeFilesPath($this->_theme));
 }
コード例 #3
0
 /**
  * Get directory where themes files are stored
  *
  * @return null|string
  */
 public function getThemeFilesPath()
 {
     return $this->theme->isPhysical() ? $this->customizationPath->getThemeFilesPath($this->theme) : $this->customizationPath->getCustomizationPath($this->theme);
 }