diff --git a/plugins/bc-widget-area/src/Model/Entity/WidgetArea.php b/plugins/bc-widget-area/src/Model/Entity/WidgetArea.php index 67ad32bddd..6b7bc83ff7 100644 --- a/plugins/bc-widget-area/src/Model/Entity/WidgetArea.php +++ b/plugins/bc-widget-area/src/Model/Entity/WidgetArea.php @@ -105,6 +105,7 @@ protected function _setWidgets($value) * @return int * @checked * @noTodo + * @unitTest */ protected function _getCount() { diff --git a/plugins/bc-widget-area/tests/TestCase/Model/Entity/WidgetAreaTest.php b/plugins/bc-widget-area/tests/TestCase/Model/Entity/WidgetAreaTest.php new file mode 100644 index 0000000000..78ac6c3671 --- /dev/null +++ b/plugins/bc-widget-area/tests/TestCase/Model/Entity/WidgetAreaTest.php @@ -0,0 +1,49 @@ +WidgetArea = $this->getTableLocator()->get('BcWidgetArea.WidgetAreas'); + } + + public function tearDown(): void + { + unset($this->WidgetArea); + parent::tearDown(); + } + + /** + * test _getCount + */ + public function test_getCount() + { + $widgetArea = new WidgetArea([ + 'widgets' => 'a:1:{i:0;a:1:{s:4:"test";a:2:{s:4:"sort";i:1;s:4:"name";s:4:"test";}}}', + ]); + $getCount = $this->execPrivateMethod($widgetArea, '_getCount', []); + $this->assertEquals(1, $getCount); + } + + /** + * test _getWidgetsArray + */ + public function test_getWidgetsArray() + { + $this->markTestIncomplete('こちらのテストはまだ未確認です'); + } + + /** + * test _setWidgets + */ + public function test_setWidgets() + { + $this->markTestIncomplete('こちらのテストはまだ未確認です'); + } +} \ No newline at end of file