Skip to content

Commit

Permalink
unitTest_BcThemeFilePlugin_services (#3386)
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 38a27ed commit d4745cf
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/bc-theme-file/src/BcThemeFilePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class BcThemeFilePlugin extends BcPlugin
* @param ContainerInterface $container
* @checked
* @noTodo
* @UnitTest
*/
public function services(ContainerInterface $container): void
{
Expand Down
39 changes: 39 additions & 0 deletions plugins/bc-theme-file/tests/TestCase/BcThemeFilePluginTest.php
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));
}
}

0 comments on commit d4745cf

Please sign in to comment.