本文整理汇总了PHP中Magento\Framework\View\Asset\Repository::method方法的典型用法代码示例。如果您正苦于以下问题:PHP Repository::method方法的具体用法?PHP Repository::method怎么用?PHP Repository::method使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\View\Asset\Repository
的用法示例。
在下文中一共展示了Repository::method方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetDefaultEmailLogo
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: testGetDefaultEmailLogo
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: testGetDefaultEmailLogo
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());
}