Skip to content

Commit

Permalink
unitTest_BcWidgetAreaBaserHelper_methods (#3391)
Browse files Browse the repository at this point in the history
Co-authored-by: thangnn <[email protected]>
  • Loading branch information
thangnnmd and thangnn authored Apr 29, 2024
1 parent 066ee1a commit 73a8f0b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class BcWidgetAreaBaserHelper extends Helper implements BcPluginBaserHelperInter
* @return array[]
* @checked
* @noTodo
* @unitTest
*/
public function methods(): array
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace BcWidgetArea\Test\TestCase\View\Helper;

use BaserCore\TestSuite\BcTestCase;
use BcWidgetArea\View\Helper\BcWidgetAreaBaserHelper;
use Cake\View\View;

class BcWidgetAreaBaserHelperTest extends BcTestCase
{
public function setUp(): void
{
parent::setUp();
$this->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']);
}
}

0 comments on commit 73a8f0b

Please sign in to comment.