From aeebde6b79b7e5f893a2060a5840e463ec0a0c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=E1=BB=97=20V=C4=83n=20H=C3=B9ng?= Date: Mon, 6 Nov 2023 18:24:41 +0700 Subject: [PATCH] =?UTF-8?q?=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestCase/Controller/UploaderCategoriesControllerTest.php | 1 + .../tests/TestCase/Controller/UploaderFilesControllerTest.php | 1 + .../tests/TestCase/Model/Table/UploaderCategoriesTableTest.php | 1 + .../tests/TestCase/Service/UploadCategoriesServiceTest.php | 1 + .../tests/TestCase/Service/UploadConfigsServiceTest.php | 3 ++- 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/bc-uploader/tests/TestCase/Controller/UploaderCategoriesControllerTest.php b/plugins/bc-uploader/tests/TestCase/Controller/UploaderCategoriesControllerTest.php index d092585131..0c7283228a 100644 --- a/plugins/bc-uploader/tests/TestCase/Controller/UploaderCategoriesControllerTest.php +++ b/plugins/bc-uploader/tests/TestCase/Controller/UploaderCategoriesControllerTest.php @@ -64,6 +64,7 @@ public function setUp(): void public function tearDown(): void { parent::tearDown(); + $this->truncateTable('uploader_categories'); } /** diff --git a/plugins/bc-uploader/tests/TestCase/Controller/UploaderFilesControllerTest.php b/plugins/bc-uploader/tests/TestCase/Controller/UploaderFilesControllerTest.php index f9bb89a688..41538e1576 100644 --- a/plugins/bc-uploader/tests/TestCase/Controller/UploaderFilesControllerTest.php +++ b/plugins/bc-uploader/tests/TestCase/Controller/UploaderFilesControllerTest.php @@ -63,6 +63,7 @@ public function setUp(): void public function tearDown(): void { parent::tearDown(); + $this->truncateTable('uploader_categories'); } /** diff --git a/plugins/bc-uploader/tests/TestCase/Model/Table/UploaderCategoriesTableTest.php b/plugins/bc-uploader/tests/TestCase/Model/Table/UploaderCategoriesTableTest.php index ecd45450cc..c724d2c462 100644 --- a/plugins/bc-uploader/tests/TestCase/Model/Table/UploaderCategoriesTableTest.php +++ b/plugins/bc-uploader/tests/TestCase/Model/Table/UploaderCategoriesTableTest.php @@ -45,6 +45,7 @@ public function tearDown(): void { unset($this->UploaderCategoriesTable); parent::tearDown(); + $this->truncateTable('uploader_categories'); } /** diff --git a/plugins/bc-uploader/tests/TestCase/Service/UploadCategoriesServiceTest.php b/plugins/bc-uploader/tests/TestCase/Service/UploadCategoriesServiceTest.php index c684bdd487..8b3b9f8bb1 100644 --- a/plugins/bc-uploader/tests/TestCase/Service/UploadCategoriesServiceTest.php +++ b/plugins/bc-uploader/tests/TestCase/Service/UploadCategoriesServiceTest.php @@ -53,6 +53,7 @@ public function tearDown(): void { unset($this->UploaderCategoriesService); parent::tearDown(); + $this->truncateTable('uploader_categories'); } /** diff --git a/plugins/bc-uploader/tests/TestCase/Service/UploadConfigsServiceTest.php b/plugins/bc-uploader/tests/TestCase/Service/UploadConfigsServiceTest.php index 0eeba12aa9..878857a57a 100644 --- a/plugins/bc-uploader/tests/TestCase/Service/UploadConfigsServiceTest.php +++ b/plugins/bc-uploader/tests/TestCase/Service/UploadConfigsServiceTest.php @@ -51,6 +51,7 @@ public function setUp(): void public function tearDown(): void { parent::tearDown(); + $this->truncateTable('uploader_files'); $this->truncateTable('uploader_categories'); } @@ -86,7 +87,7 @@ public function test_clearCache() //実行前の確認 $this->UploaderConfigsService->get(); $entity = $this->getPrivateProperty($this->UploaderConfigsService, 'entity'); - $this->assertNull($entity); + $this->assertNotNull($entity); //正常系実行 $this->UploaderConfigsService->clearCache(); $result = $this->getPrivateProperty($this->UploaderConfigsService, 'entity');