-
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.
Merge pull request #3939 from HungDV2022/unitest_InstallationsService…
…_sendCompleteMail InstallationsService::sendCompleteMail() のユニットテスト
- Loading branch information
Showing
2 changed files
with
19 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
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
use BaserCore\Service\PermissionGroupsServiceInterface; | ||
use BaserCore\Test\Factory\ContentFactory; | ||
use BaserCore\Test\Factory\ContentFolderFactory; | ||
use BaserCore\Test\Factory\SiteConfigFactory; | ||
use BaserCore\Test\Factory\SiteFactory; | ||
use BaserCore\Test\Scenario\InitAppScenario; | ||
use BaserCore\TestSuite\BcTestCase; | ||
|
@@ -198,6 +199,23 @@ public function testTestConnectDb() | |
$this->Installations->testConnectDb($config); | ||
} | ||
|
||
/** | ||
* test sendCompleteMail | ||
*/ | ||
public function testSendCompleteMail() | ||
{ | ||
//データを生成 | ||
SiteConfigFactory::make(['name' => 'email', 'value' => '[email protected]'])->persist(); | ||
|
||
//正常テスト | ||
$this->Installations->sendCompleteMail(['admin_email' => '[email protected]']); | ||
|
||
//エラーを発生 | ||
$this->expectException(\InvalidArgumentException::class); | ||
$this->expectExceptionMessage('The email set for `to` is empty.'); | ||
$this->Installations->sendCompleteMail(['admin_email' => '']); | ||
} | ||
|
||
/** | ||
* test setAdminEmail | ||
*/ | ||
|