diff --git a/plugins/bc-mail/src/Controller/Admin/MailContentsController.php b/plugins/bc-mail/src/Controller/Admin/MailContentsController.php index 75d4da3a1f..0a9af8693c 100644 --- a/plugins/bc-mail/src/Controller/Admin/MailContentsController.php +++ b/plugins/bc-mail/src/Controller/Admin/MailContentsController.php @@ -99,6 +99,7 @@ public function edit(MailContentsAdminServiceInterface $service, int $id) * @return Response * @checked * @noTodo + * @unitTest */ private function redirectEditMail($template) { diff --git a/plugins/bc-mail/tests/TestCase/Controller/Admin/MailContentsControllerTest.php b/plugins/bc-mail/tests/TestCase/Controller/Admin/MailContentsControllerTest.php index d67bbbcb5c..7594658a48 100644 --- a/plugins/bc-mail/tests/TestCase/Controller/Admin/MailContentsControllerTest.php +++ b/plugins/bc-mail/tests/TestCase/Controller/Admin/MailContentsControllerTest.php @@ -98,7 +98,12 @@ public function testAdmin_edit() */ public function test_redirectEditMail() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $rs = $this->execPrivateMethod($this->MailContentsController, 'redirectEditMail', ['default']); + $this->assertEquals(302, $rs->getStatusCode()); + $this->assertEquals( + ['https://localhost/baser/admin/bc-theme-file/theme_files/edit/BcFront/BcMail/email/text/default.php'], + $rs->getHeader('Location') + ); } /**