Skip to content

Commit

Permalink
ユニットテストを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Oct 9, 2023
1 parent dbbf4a2 commit be31140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions plugins/baser-core/src/View/Helper/BcAuthHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BcAuthHelper extends Helper
* Helper
* @var array
*/
public $helpers = ['BcBaser'];
public $helpers = ['BaserCore.BcBaser'];

/**
* 現在認証プレフィックスを取得する
Expand Down Expand Up @@ -163,13 +163,11 @@ public function getCurrentName()
{
$currentPrefixSetting = $this->getCurrentPrefixSetting();
if (!empty($currentPrefixSetting['name']) && $this->getCurrentPrefix() !== 'Front') {
$name = $currentPrefixSetting['name'];
} elseif (isset($this->BcBaser->siteConfig['formal_name'])) {
$name = $this->BcBaser->siteConfig['formal_name'];
return $currentPrefixSetting['name'];
} else {
$name = '';
$siteName = $this->BcBaser->getSiteName();
return $siteName ? $siteName : '';
}
return $name;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function testGetLogoLink()
public function testGetLogoText()
{
// フロントで管理画面利用不可
$this->assertEquals('baserCMS', $this->BcToolbar->getLogoText());
$this->assertEquals('メインサイト', $this->BcToolbar->getLogoText());
// フロントで管理画面利用可能
$this->loginAdmin($this->getRequest('/baser/admin'));
$this->assertEquals('ダッシュボード', $this->BcToolbar->getLogoText());
Expand All @@ -342,7 +342,7 @@ public function testGetLogoLinkOptions()
{
// フロントで管理画面利用不可
$this->assertEquals([
'title' => 'baserCMS',
'title' => 'メインサイト',
'class' => 'bca-toolbar__logo-link',
'escapeTitle' => false
], $this->BcToolbar->getLogoLinkOptions());
Expand Down

0 comments on commit be31140

Please sign in to comment.