diff --git a/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php b/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php index 9214a58450..ec28068baa 100644 --- a/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php +++ b/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php @@ -322,6 +322,7 @@ public function getEntryIndexTitle(CustomTable $table, CustomEntry $entry) * プラグインのメタフィールドを表示する * @checked * @noTodo + * @unitTest */ public function displayPluginMeta() { diff --git a/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAdminHelperTest.php b/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAdminHelperTest.php index e7aea1f25c..ea1ed5d294 100644 --- a/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAdminHelperTest.php +++ b/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAdminHelperTest.php @@ -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; @@ -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(' ', $output); + } }