-
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_BcMailBaserHelper_methods (#3376)
Co-authored-by: thangnn <[email protected]>
- Loading branch information
Showing
2 changed files
with
55 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
54 changes: 54 additions & 0 deletions
54
plugins/bc-mail/tests/TestCase/View/Helper/BcMailBaserHelperTest.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,54 @@ | ||
<?php | ||
|
||
namespace BcMail\Test\TestCase\View\Helper; | ||
|
||
use BaserCore\TestSuite\BcTestCase; | ||
use BcMail\View\Helper\BcMailBaserHelper; | ||
use Cake\View\View; | ||
|
||
class BcMailBaserHelperTest extends BcTestCase | ||
{ | ||
/** | ||
* setUp | ||
* | ||
* @return void | ||
*/ | ||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->BcMailBaser = new BcMailBaserHelper(new View()); | ||
} | ||
|
||
/** | ||
* tearDown | ||
* | ||
*/ | ||
public function tearDown(): void | ||
{ | ||
parent::tearDown(); | ||
} | ||
|
||
/** | ||
* test methods | ||
*/ | ||
public function testMethods() | ||
{ | ||
$methods = $this->BcMailBaser->methods(); | ||
$this->assertEquals(['Mail', 'isMail'], $methods['isMail']); | ||
$this->assertEquals(['Mail', 'descriptionExists'], $methods['mailFormDescriptionExists']); | ||
$this->assertEquals(['Mail', 'description'], $methods['mailFormDescription']); | ||
$this->assertEquals(['Mailform', 'freeze'], $methods['freezeMailForm']); | ||
$this->assertEquals(['Mailform', 'create'], $methods['createMailForm']); | ||
$this->assertEquals(['Mailform', 'hidden'], $methods['mailFormHidden']); | ||
$this->assertEquals(['Mailform', 'authCaptcha'], $methods['mailFormAuthCaptcha']); | ||
$this->assertEquals(['Mailform', 'submit'], $methods['mailFormSubmit']); | ||
$this->assertEquals(['Mailform', 'end'], $methods['endMailForm']); | ||
$this->assertEquals(['Mailform', 'unlockField'], $methods['unlockMailFormField']); | ||
$this->assertEquals(['Mailform', 'getSourceValue'], $methods['getMailFormSourceValue']); | ||
$this->assertEquals(['Mailform', 'error'], $methods['mailFormError']); | ||
$this->assertEquals(['Mailform', 'control'], $methods['mailFormControl']); | ||
$this->assertEquals(['Mailform', 'getGroupValidErrors'], $methods['getMailFormGroupValidErrors']); | ||
$this->assertEquals(['Mailform', 'isGroupLastField'], $methods['isMailFormGroupLastField']); | ||
$this->assertEquals(['Mailform', 'label'], $methods['mailFormLabel']); | ||
} | ||
} |