From 73a8f0b850161e4f4729ab87b6a21b70a7442912 Mon Sep 17 00:00:00 2001 From: thangnnmd <150879641+thangnnmd@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:23:35 +0700 Subject: [PATCH] unitTest_BcWidgetAreaBaserHelper_methods (#3391) Co-authored-by: thangnn --- .../View/Helper/BcWidgetAreaBaserHelper.php | 1 + .../Helper/BcWidgetAreaBaserHelperTest.php | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 plugins/bc-widget-area/tests/TestCase/View/Helper/BcWidgetAreaBaserHelperTest.php diff --git a/plugins/bc-widget-area/src/View/Helper/BcWidgetAreaBaserHelper.php b/plugins/bc-widget-area/src/View/Helper/BcWidgetAreaBaserHelper.php index a685324e2a..cce9e087cb 100644 --- a/plugins/bc-widget-area/src/View/Helper/BcWidgetAreaBaserHelper.php +++ b/plugins/bc-widget-area/src/View/Helper/BcWidgetAreaBaserHelper.php @@ -37,6 +37,7 @@ class BcWidgetAreaBaserHelper extends Helper implements BcPluginBaserHelperInter * @return array[] * @checked * @noTodo + * @unitTest */ public function methods(): array { diff --git a/plugins/bc-widget-area/tests/TestCase/View/Helper/BcWidgetAreaBaserHelperTest.php b/plugins/bc-widget-area/tests/TestCase/View/Helper/BcWidgetAreaBaserHelperTest.php new file mode 100644 index 0000000000..1f75af9aa4 --- /dev/null +++ b/plugins/bc-widget-area/tests/TestCase/View/Helper/BcWidgetAreaBaserHelperTest.php @@ -0,0 +1,32 @@ +BcWidgetAreaBaserHelper = new BcWidgetAreaBaserHelper(new View()); + } + + public function tearDown(): void + { + parent::tearDown(); + } + + /** + * test methods + */ + + public function test_methods() + { + $methods = $this->BcWidgetAreaBaserHelper->methods(); + $this->assertEquals(['BcWidgetArea', 'widgetArea'], $methods['widgetArea']); + $this->assertEquals(['BcWidgetArea', 'getWidgetArea'], $methods['getWidgetArea']); + } +} \ No newline at end of file