-
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.
unitTest_BcThemeFilePlugin_services (#3386)
Co-authored-by: thangnn <[email protected]>
- Loading branch information
Showing
2 changed files
with
40 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
39 changes: 39 additions & 0 deletions
39
plugins/bc-theme-file/tests/TestCase/BcThemeFilePluginTest.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,39 @@ | ||
<?php | ||
|
||
namespace BcThemeFile\Test\TestCase; | ||
|
||
use BaserCore\TestSuite\BcTestCase; | ||
use BcThemeFile\BcThemeFilePlugin; | ||
use BcThemeFile\Service\Admin\ThemeFilesAdminServiceInterface; | ||
use BcThemeFile\Service\Admin\ThemeFoldersAdminServiceInterface; | ||
use BcThemeFile\Service\ThemeFilesServiceInterface; | ||
use BcThemeFile\Service\ThemeFoldersServiceInterface; | ||
use Cake\Core\Container; | ||
|
||
class BcThemeFilePluginTest extends BcTestCase | ||
{ | ||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->BcThemeFilePlugin = new BcThemeFilePlugin(['name' => 'BcThemeFile']); | ||
} | ||
|
||
public function tearDown(): void | ||
{ | ||
unset($this->BcThemeFilePlugin); | ||
parent::tearDown(); | ||
} | ||
|
||
/** | ||
* test services | ||
*/ | ||
public function test_services() | ||
{ | ||
$container = new Container(); | ||
$this->BcThemeFilePlugin->services($container); | ||
$this->assertTrue($container->has(ThemeFilesServiceInterface::class)); | ||
$this->assertTrue($container->has(ThemeFilesAdminServiceInterface::class)); | ||
$this->assertTrue($container->has(ThemeFoldersServiceInterface::class)); | ||
$this->assertTrue($container->has(ThemeFoldersAdminServiceInterface::class)); | ||
} | ||
} |