diff --git a/plugins/bc-mail/src/View/Helper/BcMailBaserHelper.php b/plugins/bc-mail/src/View/Helper/BcMailBaserHelper.php index 2ed323bd93..0ec7df0c71 100644 --- a/plugins/bc-mail/src/View/Helper/BcMailBaserHelper.php +++ b/plugins/bc-mail/src/View/Helper/BcMailBaserHelper.php @@ -40,6 +40,7 @@ class BcMailBaserHelper extends Helper implements BcPluginBaserHelperInterface * @return array[] * @checked * @noTodo + * @unitTest */ public function methods(): array { diff --git a/plugins/bc-mail/tests/TestCase/View/Helper/BcMailBaserHelperTest.php b/plugins/bc-mail/tests/TestCase/View/Helper/BcMailBaserHelperTest.php new file mode 100644 index 0000000000..6b67f2c921 --- /dev/null +++ b/plugins/bc-mail/tests/TestCase/View/Helper/BcMailBaserHelperTest.php @@ -0,0 +1,54 @@ +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']); + } +} \ No newline at end of file