From 99b885b0370e712f216693fa231ae5dd414e9519 Mon Sep 17 00:00:00 2001 From: HungDV2022 Date: Tue, 17 Dec 2024 11:42:13 +0900 Subject: [PATCH] =?UTF-8?q?MailContentsController::redirectEditForm()=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..d49ecdf7d4 100644 --- a/plugins/bc-mail/src/Controller/Admin/MailContentsController.php +++ b/plugins/bc-mail/src/Controller/Admin/MailContentsController.php @@ -135,6 +135,7 @@ private function redirectEditMail($template) * @return Response * @checked * @noTodo + * @unitTest */ private function redirectEditForm($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..37106c2d9f 100644 --- a/plugins/bc-mail/tests/TestCase/Controller/Admin/MailContentsControllerTest.php +++ b/plugins/bc-mail/tests/TestCase/Controller/Admin/MailContentsControllerTest.php @@ -106,7 +106,12 @@ public function test_redirectEditMail() */ public function test_redirectEditForm() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $rs = $this->execPrivateMethod($this->MailContentsController, 'redirectEditForm', ['default']); + $this->assertEquals(302, $rs->getStatusCode()); + $this->assertEquals( + ['https://localhost/baser/admin/bc-theme-file/theme_files/edit/BcFront/BcMail/etc/Mail/default/index.php'], + $rs->getHeader('Location') + ); } /**