From b39d405152da221f200c97a8cf33676cafa4a233 Mon Sep 17 00:00:00 2001 From: thangnn Date: Thu, 21 Nov 2024 14:09:49 +0700 Subject: [PATCH] Add unitTest_BcEventListener_implementedEvents --- plugins/baser-core/src/Event/BcEventListener.php | 1 + .../tests/TestCase/Event/BcEventListenerTest.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/plugins/baser-core/src/Event/BcEventListener.php b/plugins/baser-core/src/Event/BcEventListener.php index 355b454a40..bf3c6dd9dc 100644 --- a/plugins/baser-core/src/Event/BcEventListener.php +++ b/plugins/baser-core/src/Event/BcEventListener.php @@ -78,6 +78,7 @@ public function __construct() * @return array * @checked * @noTodo + * @unitTest */ public function implementedEvents(): array { diff --git a/plugins/baser-core/tests/TestCase/Event/BcEventListenerTest.php b/plugins/baser-core/tests/TestCase/Event/BcEventListenerTest.php index 3fdebf0398..fd6c79b8eb 100644 --- a/plugins/baser-core/tests/TestCase/Event/BcEventListenerTest.php +++ b/plugins/baser-core/tests/TestCase/Event/BcEventListenerTest.php @@ -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); + } }