-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add unitTest_BcWidgetAreaPlugin_services
- Loading branch information
thangnn
committed
May 7, 2024
1 parent
3ae812d
commit 3a84c36
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
plugins/bc-widget-area/tests/TestCase/BcWidgetAreaPluginTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace BcWidgetArea\Test\TestCase; | ||
|
||
use BaserCore\TestSuite\BcTestCase; | ||
use BcWidgetArea\BcWidgetAreaPlugin; | ||
use BcWidgetArea\Service\Admin\WidgetAreasAdminServiceInterface; | ||
use BcWidgetArea\Service\WidgetAreasServiceInterface; | ||
use Cake\Core\Container; | ||
|
||
class BcWidgetAreaPluginTest extends BcTestCase | ||
{ | ||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->BcWidgetAreaPlugin = new BcWidgetAreaPlugin(['name' => 'BcWidgetArea']); | ||
} | ||
|
||
public function tearDown(): void | ||
{ | ||
unset($this->BcWidgetAreaPlugin); | ||
parent::tearDown(); | ||
} | ||
|
||
public function test_services(): void | ||
{ | ||
$container = new Container(); | ||
$this->BcWidgetAreaPlugin->services($container); | ||
$this->assertTrue($container->has(WidgetAreasServiceInterface::class)); | ||
$this->assertTrue($container->has(WidgetAreasAdminServiceInterface::class)); | ||
} | ||
} |