diff --git a/plugins/bc-mail/src/View/Helper/MailformHelper.php b/plugins/bc-mail/src/View/Helper/MailformHelper.php index f5dba87e79..7a62a1aa6a 100755 --- a/plugins/bc-mail/src/View/Helper/MailformHelper.php +++ b/plugins/bc-mail/src/View/Helper/MailformHelper.php @@ -252,6 +252,7 @@ public function control(string $fieldName, array $attributes = []): string * @return string * @checked * @noTodo + * @unitTest */ public function create($context = null, $options = []): string { diff --git a/plugins/bc-mail/tests/TestCase/View/Helper/MailformHelperTest.php b/plugins/bc-mail/tests/TestCase/View/Helper/MailformHelperTest.php index 27dd75067d..2411cabb90 100644 --- a/plugins/bc-mail/tests/TestCase/View/Helper/MailformHelperTest.php +++ b/plugins/bc-mail/tests/TestCase/View/Helper/MailformHelperTest.php @@ -12,6 +12,7 @@ use BaserCore\TestSuite\BcTestCase; use BcMail\Model\Entity\MailField; +use BcMail\Test\Factory\MailMessagesFactory; use BcMail\View\Helper\MailformHelper; use Cake\ORM\ResultSet; use Cake\View\View; @@ -50,7 +51,11 @@ public function testControl() */ public function testCreate() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $rs = $this->MailformHelper->create(); + $this->assertTextContains('form enctype="multipart/form-data"', $rs); + + $rs = $this->MailformHelper->create(MailMessagesFactory::make()->getEntity(), ['url' => '/test']); + $this->assertTextContains('action="/test"', $rs); } /**