Skip to content

Commit

Permalink
add unitTest_MailHelper_getDescription (#3439)
Browse files Browse the repository at this point in the history
Co-authored-by: thangnn <[email protected]>
  • Loading branch information
thangnnmd and thangnn authored Jun 8, 2024
1 parent 2f3460f commit cd4bcf1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/bc-mail/src/View/Helper/MailHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public function getMailTemplates($siteId = 1)
* @return string メールフォームの説明文
* @checked
* @noTodo
* @unitTest
*/
public function getDescription()
{
Expand All @@ -172,6 +173,7 @@ public function getDescription()
* @return void
* @checked
* @noTodo
* @unitTest ラッパーのためテスト不要
*/
public function description()
{
Expand Down
14 changes: 14 additions & 0 deletions plugins/bc-mail/tests/TestCase/View/Helper/MailHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,18 @@ public function test_descriptionExists()
$rs = $this->MailHelper->descriptionExists();
$this->assertFalse($rs);
}

/**
* test testGetDescription
*/
public function test_getDescription()
{
$mailContent = new MailContent();
$mailContent->description = 'test description';

$this->MailHelper->currentMailContent = $mailContent;

$rs = $this->MailHelper->getDescription();
$this->assertEquals('test description', $rs);
}
}

0 comments on commit cd4bcf1

Please sign in to comment.