Skip to content

Commit

Permalink
Merge pull request #4091 from HungDV2022/unittest_InstallationsContro…
Browse files Browse the repository at this point in the history
…ller_beforeFilter

InstallationsController::beforeFilter() ユニットテスト
  • Loading branch information
HungDV2022 authored Dec 20, 2024
2 parents ee42c9e + a8d9e93 commit 9526bed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class InstallationsController extends BcAdminAppController
* @return void
* @checked
* @noTodo
* @unitTest
*/
public function beforeFilter(EventInterface $event)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"));
}

/**
Expand Down

0 comments on commit 9526bed

Please sign in to comment.