Skip to content

Commit

Permalink
Add unitTest_BcEventListener_construct
Browse files Browse the repository at this point in the history
  • Loading branch information
thangnn committed Nov 21, 2024
1 parent e7d3e84 commit c777b7b
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 c777b7b

Please sign in to comment.