-
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_BcMailServiceProvider_services
- Loading branch information
thangnn
committed
Apr 23, 2024
1 parent
73395b3
commit d2cae6b
Showing
2 changed files
with
45 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
44 changes: 44 additions & 0 deletions
44
plugins/bc-mail/tests/TestCase/ServiceProvider/BcMailServiceProviderTest.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,44 @@ | ||
<?php | ||
|
||
namespace BcMail\Test\TestCase\ServiceProvider; | ||
|
||
use BaserCore\TestSuite\BcTestCase; | ||
use BcMail\ServiceProvider\BcMailServiceProvider; | ||
use Cake\Core\Container; | ||
|
||
class BcMailServiceProviderTest extends BcTestCase | ||
{ | ||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->Provider = new BcMailServiceProvider(); | ||
} | ||
|
||
public function tearDown(): void | ||
{ | ||
unset($this->Provider); | ||
parent::tearDown(); | ||
} | ||
|
||
public function testServices() | ||
{ | ||
$container = new Container(); | ||
$this->Provider->services($container); | ||
$mailConfigsService = $container->get('BcMail\Service\MailConfigsServiceInterface'); | ||
$this->assertEquals('BcMail\Service\MailConfigsService', get_class($mailConfigsService)); | ||
$mailContentsService = $container->get('BcMail\Service\MailContentsServiceInterface'); | ||
$this->assertEquals('BcMail\Service\MailContentsService', get_class($mailContentsService)); | ||
$mailContentsAdminService = $container->get('BcMail\Service\Admin\MailContentsAdminServiceInterface'); | ||
$this->assertEquals('BcMail\Service\Admin\MailContentsAdminService', get_class($mailContentsAdminService)); | ||
$mailFieldsService = $container->get('BcMail\Service\MailFieldsServiceInterface'); | ||
$this->assertEquals('BcMail\Service\MailFieldsService', get_class($mailFieldsService)); | ||
$mailFieldsAdminService = $container->get('BcMail\Service\Admin\MailFieldsAdminServiceInterface'); | ||
$this->assertEquals('BcMail\Service\Admin\MailFieldsAdminService', get_class($mailFieldsAdminService)); | ||
$mailMessagesService = $container->get('BcMail\Service\MailMessagesServiceInterface'); | ||
$this->assertEquals('BcMail\Service\MailMessagesService', get_class($mailMessagesService)); | ||
$mailMessagesAdminService = $container->get('BcMail\Service\Admin\MailMessagesAdminServiceInterface'); | ||
$this->assertEquals('BcMail\Service\Admin\MailMessagesAdminService', get_class($mailMessagesAdminService)); | ||
$mailFrontService = $container->get('BcMail\Service\Front\MailFrontServiceInterface'); | ||
$this->assertEquals('BcMail\Service\Front\MailFrontService', get_class($mailFrontService)); | ||
} | ||
} |