diff --git a/tests/Eccube/Tests/Web/Admin/Content/FileControllerTest.php b/tests/Eccube/Tests/Web/Admin/Content/FileControllerTest.php index fd51d157756..5f7e422dbc2 100644 --- a/tests/Eccube/Tests/Web/Admin/Content/FileControllerTest.php +++ b/tests/Eccube/Tests/Web/Admin/Content/FileControllerTest.php @@ -73,6 +73,20 @@ public function testDelete() $this->assertFalse(file_exists($filepath)); } + /** + * `select_file` が空の場合は `admin_content_file` へリダイレクトする. + * + * see https://github.com/EC-CUBE/ec-cube/pull/5298 + */ + public function testDeleteWithEmpty() + { + $this->client->request( + 'DELETE', + $this->generateUrl('admin_content_file_delete').'?select_file=' + ); + $this->assertTrue($this->client->getResponse()->isRedirect($this->generateUrl('admin_content_file'))); + } + public function testIndexWithCreate() { $folder = 'create_folder';