Skip to content

Commit

Permalink
Merge pull request #4034 from thangnnmd/unitTest_CustomContentAdminHe…
Browse files Browse the repository at this point in the history
…lper_displayPluginMeta

CustomContentAdminHelper::displayPluginMeta
  • Loading branch information
HungDV2022 authored Nov 22, 2024
2 parents ed9a4e9 + 3ece7f5 commit e364a88
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ public function getEntryIndexTitle(CustomTable $table, CustomEntry $entry)
* プラグインのメタフィールドを表示する
* @checked
* @noTodo
* @unitTest
*/
public function displayPluginMeta()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use BaserCore\Service\BcDatabaseServiceInterface;
use BaserCore\TestSuite\BcTestCase;
use BcBlog\View\BlogAdminAppView;
use BcCustomContent\Model\Entity\CustomEntry;
use BcCustomContent\Service\CustomEntriesServiceInterface;
use BcCustomContent\Service\CustomTablesServiceInterface;
Expand Down Expand Up @@ -511,4 +512,23 @@ public function testError()
$rs = $this->CustomContentAdminHelper->error($customLink, ['parent' => $customLinkParent]);
$this->assertEquals('', $rs);
}

/**
* test displayPluginMeta
*/
public function testDisplayPluginMeta()
{
//準備
$view = new BlogAdminAppView($this->getRequest('/baser/admin'));
$view->loadHelper('BcAdminForm');
$this->CustomContentAdminHelper = new CustomContentAdminHelper($view);

//テスト
ob_start();
$this->CustomContentAdminHelper->displayPluginMeta();
$output = ob_get_clean();

//戻り値を確認
$this->assertTextContains('<label for="">自動補完郵便番号設定</label> ', $output);
}
}

0 comments on commit e364a88

Please sign in to comment.