Skip to content

Commit

Permalink
Merge pull request #4037 from thangnnmd/unitTest_BcEventListener_impl…
Browse files Browse the repository at this point in the history
…ementedEvents

BcEventListener::implementedEvents
  • Loading branch information
HungDV2022 authored Nov 22, 2024
2 parents ccf6124 + b39d405 commit ba25a41
Show file tree
Hide file tree
Showing 2 changed files with 12 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 @@ -78,6 +78,7 @@ public function __construct()
* @return array
* @checked
* @noTodo
* @unitTest
*/
public function implementedEvents(): array
{
Expand Down
11 changes: 11 additions & 0 deletions plugins/baser-core/tests/TestCase/Event/BcEventListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,15 @@ public static function isActionDataProvider()
['Users.Index', 'Users.Index', true, true],
];
}


/**
* test implementedEvents
*/
public function testImplementedEvents()
{
$this->BcEventListener->events = ['isAction' => ['priority' => 100]];
$rs = $this->BcEventListener->implementedEvents();
$this->assertNotEmpty($rs);
}
}

0 comments on commit ba25a41

Please sign in to comment.