コード例 #1
0
ファイル: TemplateTest.php プロジェクト: kid17/magento2
 public function testGetDefaultEmailLogo()
 {
     $model = $this->getModelMock();
     $value = 'urlWithParamsValue';
     $this->assetRepo->method('getUrlWithParams')->with('Magento_Email::logo_email.png', ['area' => \Magento\Framework\App\Area::AREA_FRONTEND])->will($this->returnValue($value));
     $this->assertEquals($value, $model->getDefaultEmailLogo());
 }
コード例 #2
0
 public function testGetDefaultEmailLogo()
 {
     $model = $this->getModelMock(['getDesignParams']);
     $value = 'urlWithParamsValue';
     $designParams = ['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'theme' => 'themeId', 'locale' => 'localeId'];
     $model->expects($this->once())->method('getDesignParams')->will($this->returnValue($designParams));
     $this->assetRepo->method('getUrlWithParams')->with(\Magento\Email\Model\AbstractTemplate::DEFAULT_LOGO_FILE_ID, $designParams)->will($this->returnValue($value));
     $this->assertEquals($value, $model->getDefaultEmailLogo());
 }
コード例 #3
0
 public function testGetDefaultEmailLogo()
 {
     $model = $this->getModelMock(['getDesignParams']);
     $value = 'urlWithParamsValue';
     $designParams = ['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'theme' => 'themeId', 'locale' => 'localeId'];
     $model->expects($this->once())->method('getDesignParams')->will($this->returnValue($designParams));
     $this->assetRepo->method('getUrlWithParams')->with('Magento_Email::logo_email.png', $designParams)->will($this->returnValue($value));
     $this->assertEquals($value, $model->getDefaultEmailLogo());
 }