Skip to content

Commit

Permalink
Merge pull request #4044 from HungDV2022/unittest_BlogContentsControl…
Browse files Browse the repository at this point in the history
…ler_redirectEditBlog

BlogContentsController::redirectEditBlog() ユニットテスト
  • Loading branch information
HungDV2022 authored Nov 26, 2024
2 parents a5cccf9 + f3ba023 commit 4c345f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public function edit(BlogContentsAdminServiceInterface $service, int $id)
* @return ResponseInterface
* @checked
* @noTodo
* @unitTest
*/
protected function redirectEditBlog(string $template): ResponseInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

}

0 comments on commit 4c345f1

Please sign in to comment.