From b824857639a4ec20c7b4ec7e180db9bed12ff19a Mon Sep 17 00:00:00 2001 From: nghiem-mb <127474186+nghiem-mb@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:11:50 +0700 Subject: [PATCH] CustomLinksTableTest-initialize (#2760) Co-authored-by: Nghiem --- .../src/Model/Table/CustomLinksTable.php | 1 + .../Model/Table/CustomLinksTableTest.php | 125 ++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php diff --git a/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php b/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php index ae7f30bd64..b392278cb8 100644 --- a/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php +++ b/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php @@ -36,6 +36,7 @@ class CustomLinksTable extends AppTable * @param array $config * @checked * @noTodo + * @unitTest */ public function initialize(array $config): void { diff --git a/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php new file mode 100644 index 0000000000..8977384a4e --- /dev/null +++ b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php @@ -0,0 +1,125 @@ + + * Copyright (c) NPO baser foundation + * + * @copyright Copyright (c) NPO baser foundation + * @link https://basercms.net baserCMS Project + * @since 5.0.0 + * @license https://basercms.net/license/index.html MIT License + */ + +namespace BcCustomContent\Test\TestCase\Model\Table; + +use BaserCore\TestSuite\BcTestCase; +use BcCustomContent\Model\Table\CustomLinksTable; + +/** + * CustomTablesTableTest + * @property CustomLinksTable $CustomLinksTable + */ +class CustomLinksTableTest extends BcTestCase +{ + + /** + * Set up + */ + public function setUp(): void + { + parent::setUp(); + $this->CustomLinksTable = new CustomLinksTable(); + } + + /** + * Tear down + */ + public function tearDown(): void + { + parent::tearDown(); + } + + /** + * test initialize + */ + public function test_initialize() + { + $this->assertTrue($this->CustomLinksTable->hasBehavior('Timestamp')); + $this->assertTrue($this->CustomLinksTable->hasBehavior('Tree')); + $this->assertTrue($this->CustomLinksTable->hasAssociation('CustomFields')); + $this->assertTrue($this->CustomLinksTable->hasAssociation('CustomTables')); + } + + /** + * test validationDefault + */ + public function test_validationDefault() + { + + } + + /** + * test implementedEvents + */ + public function test_implementedEvents() + { + + } + + /** + * test setTreeScope + */ + public function test_setTreeScope() + { + + } + + /** + * test beforeSave + */ + public function test_beforeSave() + { + + } + + /** + * test beforeDelete + */ + public function test_beforeDelete() + { + + } + + /** + * test updateSort + */ + public function test_updateSort() + { + + } + + /** + * test getCurentSort + */ + public function test_getCurentSort() + { + + } + + /** + * test moveOffset + */ + public function test_moveOffset() + { + + } + + /** + * test getUniqueName + */ + public function test_getUniqueName() + { + + } + + +}