better config setup

This commit is contained in:
2025-11-11 02:22:01 -08:00
parent 0d46eb4cc5
commit 31650e55c2
5 changed files with 54 additions and 25 deletions

View File

@@ -142,11 +142,14 @@ class ContactUsFormSubmissionsControllerTest extends TestCase
Configure::write('ContactUs', [
'fields' => [
'captcha' => false,
'email' => [
'confirmation' => true,
'backend' => [
'to' => 'test@example.com',
],
'email' => true,
],
'email' => [
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
'confirmation' => true, // true or false
'backend' => [ // array with enabled and the to/cc/bcc/ fields as strings or arrays
'enabled' => true,
'to' => 'test@example.com',
],
],
]);
@@ -193,9 +196,14 @@ class ContactUsFormSubmissionsControllerTest extends TestCase
Configure::write('ContactUs', [
'fields' => [
'captcha' => false,
'email' => [
'confirmation' => true,
'backend' => false,
'email' => true,
],
'email' => [
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
'confirmation' => true, // true or false
'backend' => [ // array with enabled and the to/cc/bcc/ fields as strings or arrays
'enabled' => false,
'to' => 'test@example.com',
],
],
]);
@@ -236,11 +244,14 @@ class ContactUsFormSubmissionsControllerTest extends TestCase
Configure::write('ContactUs', [
'fields' => [
'captcha' => false,
'email' => [
'confirmation' => false,
'backend' => [
'to' => 'test@example.com',
],
'email' => true,
],
'email' => [
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
'confirmation' => false, // true or false
'backend' => [ // array with enabled and the to/cc/bcc/ fields as strings or arrays
'enabled' => true,
'to' => 'test@example.com',
],
],
]);

View File

@@ -63,9 +63,14 @@ Configure::write('debug', true);
Configure::write('ContactUs', [
'fields' => [
'captcha' => false,
'email' => [
'confirmation' => false,
'backend' => false,
'email' => true,
],
'email' => [
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
'confirmation' => false, // true or false
'backend' => [ // array with enabled and the to/cc/bcc/ fields as strings or arrays
'enabled' => false,
'to' => 'test@example.com',
],
],
]);