diff --git a/plugins/bc-blog/src/Controller/Admin/BlogContentsController.php b/plugins/bc-blog/src/Controller/Admin/BlogContentsController.php index 667362d77a..f31e1b63b8 100755 --- a/plugins/bc-blog/src/Controller/Admin/BlogContentsController.php +++ b/plugins/bc-blog/src/Controller/Admin/BlogContentsController.php @@ -116,6 +116,7 @@ public function edit(BlogContentsAdminServiceInterface $service, int $id) * @return ResponseInterface * @checked * @noTodo + * @unitTest */ protected function redirectEditBlog(string $template): ResponseInterface { diff --git a/plugins/bc-blog/tests/TestCase/Controller/Admin/BlogContentsControllerTest.php b/plugins/bc-blog/tests/TestCase/Controller/Admin/BlogContentsControllerTest.php index 5d9a08e520..4995f40056 100755 --- a/plugins/bc-blog/tests/TestCase/Controller/Admin/BlogContentsControllerTest.php +++ b/plugins/bc-blog/tests/TestCase/Controller/Admin/BlogContentsControllerTest.php @@ -177,7 +177,10 @@ public function test_redirectEditLayout() */ public function test_redirectEditBlog() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $controller = new BlogContentsController($this->getRequest()); + $rs = $this->execPrivateMethod($controller, 'redirectEditBlog', ['BcColumn']); + $this->assertEquals('https://localhost/baser/admin/bc-theme-file/theme_files/edit/BcFront/BcBlog/etc/Blog/BcColumn/index.php', $rs->getHeader('Location')[0]); + $this->assertEquals(302, $rs->getStatusCode()); } }