From bad185143ea52a1529f71d94dfad57043ea89796 Mon Sep 17 00:00:00 2001 From: HungDV2022 Date: Mon, 16 Dec 2024 10:07:47 +0900 Subject: [PATCH] =?UTF-8?q?MailContentsController::redirectEditMail()=20?= =?UTF-8?q?=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=83=86=E3=82=B9=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Controller/Admin/MailContentsController.php | 1 + .../Controller/Admin/MailContentsControllerTest.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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') + ); } /**