mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Add tests for emails renderer api client and Yii2 wrapper component
This commit is contained in:
@@ -8,7 +8,6 @@ use common\emails\RendererInterface;
|
||||
use Yii;
|
||||
use yii\base\InvalidConfigException;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use yii\helpers\FileHelper;
|
||||
|
||||
class Component extends \yii\base\Component implements RendererInterface {
|
||||
|
||||
@@ -63,7 +62,7 @@ class Component extends \yii\base\Component implements RendererInterface {
|
||||
return $this->getApi()->getTemplate($request);
|
||||
}
|
||||
|
||||
private function getApi(): Api {
|
||||
protected function getApi(): Api {
|
||||
if ($this->api === null) {
|
||||
$this->api = new Api($this->serviceUrl);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ class Component extends \yii\base\Component implements RendererInterface {
|
||||
}
|
||||
|
||||
private function buildBasePath(): string {
|
||||
return FileHelper::normalizePath($this->baseDomain . '/' . $this->basePath, '/');
|
||||
return trim($this->baseDomain, '/') . '/' . trim($this->basePath, '/');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user