From a8d9e93d0fa724bfd201949d649d340f343c6d7e Mon Sep 17 00:00:00 2001 From: HungDV2022 Date: Thu, 19 Dec 2024 09:52:13 +0900 Subject: [PATCH] =?UTF-8?q?InstallationsController::beforeFilter()=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/InstallationsController.php | 1 + .../Controller/Admin/InstallationsControllerTest.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/bc-installer/src/Controller/Admin/InstallationsController.php b/plugins/bc-installer/src/Controller/Admin/InstallationsController.php index fdc348bebd..59c5c9402f 100644 --- a/plugins/bc-installer/src/Controller/Admin/InstallationsController.php +++ b/plugins/bc-installer/src/Controller/Admin/InstallationsController.php @@ -49,6 +49,7 @@ class InstallationsController extends BcAdminAppController * @return void * @checked * @noTodo + * @unitTest */ public function beforeFilter(EventInterface $event) { diff --git a/plugins/bc-installer/tests/TestCase/Controller/Admin/InstallationsControllerTest.php b/plugins/bc-installer/tests/TestCase/Controller/Admin/InstallationsControllerTest.php index ca642492d2..15c6f3af42 100644 --- a/plugins/bc-installer/tests/TestCase/Controller/Admin/InstallationsControllerTest.php +++ b/plugins/bc-installer/tests/TestCase/Controller/Admin/InstallationsControllerTest.php @@ -12,6 +12,7 @@ namespace BcInstaller\Test\TestCase\Controller\Admin; use BaserCore\TestSuite\BcTestCase; use BcInstaller\Controller\Admin\InstallationsController; +use Cake\Event\Event; /** * Class InstallationsControllerTest @@ -45,7 +46,10 @@ public function tearDown(): void */ public function testBeforeFilter() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->InstallationsController = new InstallationsController($this->getRequest()); + $event = new Event('Controller.beforeFilter', $this->InstallationsController); + $this->InstallationsController->beforeFilter($event); + $this->assertEquals(300, ini_get("max_execution_time")); } /**