Skip to content

Commit

Permalink
Merge pull request #4038 from thangnnmd/unitTest_BcEventListener_cons…
Browse files Browse the repository at this point in the history
…truct

BcEventListener::construct
  • Loading branch information
HungDV2022 authored Nov 22, 2024
2 parents ba25a41 + c777b7b commit ed9a4e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/baser-core/src/Event/BcEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class BcEventListener implements EventListenerInterface
* コンストラクタ
* @checked
* @noTodo
* @unitTest
*/
public function __construct()
{
Expand Down
13 changes: 13 additions & 0 deletions plugins/baser-core/tests/TestCase/Event/BcEventListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ public function tearDown(): void
parent::tearDown();
}

/**
* test __construct
*/
public function test__construct()
{
$this->BcEventListener = $this->getMockBuilder(BcEventListener::class)
->onlyMethods(['getAction'])
->setMockClassName('TestAction')
->getMock();

$this->assertEquals('TestAction', $this->BcEventListener->plugin);
}

/**
* Test getAction
*
Expand Down

0 comments on commit ed9a4e9

Please sign in to comment.