mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
MNT Unit test for directory seperator on windows
This commit is contained in:
parent
3993f019e9
commit
6794aa7cd3
@ -5,6 +5,7 @@ namespace SilverStripe\UserForms\Tests\Model\Recipient;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\UserForms\Model\Recipient\EmailRecipient;
|
||||
use SilverStripe\UserForms\Model\UserDefinedForm;
|
||||
|
||||
class EmailRecipientTest extends SapphireTest
|
||||
{
|
||||
@ -50,4 +51,19 @@ class EmailRecipientTest extends SapphireTest
|
||||
$this->assertSame('test2@example.com', $recipient->EmailFrom);
|
||||
$this->assertSame('test3@example.com', $recipient->EmailReplyTo);
|
||||
}
|
||||
|
||||
public function testGetEmailTemplateDropdownValues()
|
||||
{
|
||||
$form = new UserDefinedForm();
|
||||
$form->write();
|
||||
$recipient = new EmailRecipient();
|
||||
$recipient->FormID = $form->ID;
|
||||
$recipient->FormClass = UserDefinedForm::class;
|
||||
$ds = DIRECTORY_SEPARATOR;
|
||||
$expected = [
|
||||
"email{$ds}SubmittedFormEmail" => 'SubmittedFormEmail',
|
||||
"email{$ds}SubmittedFormEmailPlain" => 'SubmittedFormEmailPlain'
|
||||
];
|
||||
$this->assertSame($expected, $recipient->getEmailTemplateDropdownValues());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user