diff --git a/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php b/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php index 4a4a91bdc7..b9a03edaf7 100644 --- a/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php +++ b/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php @@ -56,6 +56,7 @@ class CustomContentAppHelper extends Helper * @param array $config * @checked * @noTodo + * @unitTest */ public function __construct(View $view, array $config = []) { @@ -67,6 +68,7 @@ public function __construct(View $view, array $config = []) * プラグインのヘルパーを読み込む * @checked * @noTodo + * @unitTest */ public function loadPluginHelper(): void { diff --git a/plugins/bc-custom-content/tests/TestCase/Utility/CustomContentUtilTest.php b/plugins/bc-custom-content/tests/TestCase/Utility/CustomContentUtilTest.php index 65b0f17d4a..746e5b46da 100644 --- a/plugins/bc-custom-content/tests/TestCase/Utility/CustomContentUtilTest.php +++ b/plugins/bc-custom-content/tests/TestCase/Utility/CustomContentUtilTest.php @@ -33,4 +33,4 @@ public function test_getPluginSetting() $rs = CustomContentUtil::getPluginSetting('testPlugin'); $this->assertEquals(['testSetting' => 'testValue'], $rs); } -} \ No newline at end of file +} diff --git a/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAppHelperTest.php b/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAppHelperTest.php index 8fb9d1a5e5..cc7b359ed8 100644 --- a/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAppHelperTest.php +++ b/plugins/bc-custom-content/tests/TestCase/View/Helper/CustomContentAppHelperTest.php @@ -5,6 +5,7 @@ use BaserCore\Service\BcDatabaseServiceInterface; use BaserCore\Test\Scenario\SitesScenario; use BaserCore\TestSuite\BcTestCase; +use BaserCore\Utility\BcUtil; use BcCustomContent\Model\Entity\CustomLink; use BcCustomContent\Service\CustomContentsServiceInterface; use BcCustomContent\Service\CustomEntriesServiceInterface; @@ -18,6 +19,10 @@ use Cake\View\View; use CakephpFixtureFactories\Scenario\ScenarioAwareTrait; +/** + * class CustomContentAppHelperTest + * @property CustomContentAppHelper $CustomContentAppHelper + */ class CustomContentAppHelperTest extends BcTestCase { /** @@ -44,12 +49,28 @@ public function tearDown(): void parent::tearDown(); } + /** + * test __construct + */ + public function test__construct() + { + //プラグインのヘルパーが読み込めるか確認すること + $this->assertNotNull($this->CustomContentAppHelper->BcCcAutoZip); + $this->assertNotNull($this->CustomContentAppHelper->BcCcCheckbox); + $this->assertNotNull($this->CustomContentAppHelper->BcCcDate); + } + /** * test loadPluginHelper */ public function test_loadPluginHelper() { - $this->markTestIncomplete('このテストはまだ実装されていません。'); + //プラグインのヘルパーが読み込めるか確認すること + $this->assertNotNull($this->CustomContentAppHelper->BcCcAutoZip); + $this->assertNotNull($this->CustomContentAppHelper->BcCcCheckbox); + $this->assertNotNull($this->CustomContentAppHelper->BcCcDate); + $this->assertNotNull($this->CustomContentAppHelper->BcCcEmail); + $this->assertNotNull($this->CustomContentAppHelper->BcCcFile); } /** * test isEnableField