split config for turnstile + turnstile helper updates
CI / testsuite (mysql, 8.2, ) (push) Successful in 3m22s
CI / testsuite (mysql, 8.4, ) (push) Successful in 4m35s
CI / testsuite (pgsql, 8.2, ) (push) Successful in 3m9s
CI / testsuite (pgsql, 8.4, ) (push) Successful in 4m13s
CI / testsuite (sqlite, 8.2, ) (push) Successful in 3m5s
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Successful in 3m5s
CI / testsuite (sqlite, 8.4, ) (push) Successful in 4m14s
CI / Coding Standard & Static Analysis (push) Successful in 2m21s
CI / testsuite (mysql, 8.2, ) (push) Successful in 3m22s
CI / testsuite (mysql, 8.4, ) (push) Successful in 4m35s
CI / testsuite (pgsql, 8.2, ) (push) Successful in 3m9s
CI / testsuite (pgsql, 8.4, ) (push) Successful in 4m13s
CI / testsuite (sqlite, 8.2, ) (push) Successful in 3m5s
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Successful in 3m5s
CI / testsuite (sqlite, 8.4, ) (push) Successful in 4m14s
CI / Coding Standard & Static Analysis (push) Successful in 2m21s
This commit is contained in:
@@ -125,7 +125,9 @@ class ContactUsFormSubmissionsControllerTest extends TestCase {
|
||||
*/
|
||||
public function testAddPostSuccessWithTurnstile(): void {
|
||||
$cntBefore = $this->ContactUsFormSubmissions->find()->count();
|
||||
Configure::write('ContactUs.turnstile', [
|
||||
Configure::write('ContactUs.fields.turnstile', true);
|
||||
Configure::write('Turnstile', [
|
||||
'enabled' => true,
|
||||
'siteKey' => '1x00000000000000000000AA',
|
||||
'secretKey' => '1x0000000000000000000000000000000AA',
|
||||
]);
|
||||
@@ -161,7 +163,9 @@ class ContactUsFormSubmissionsControllerTest extends TestCase {
|
||||
*/
|
||||
public function testAddPostInvalidTurnstile(): void {
|
||||
$cntBefore = $this->ContactUsFormSubmissions->find()->count();
|
||||
Configure::write('ContactUs.turnstile', [
|
||||
Configure::write('ContactUs.fields.turnstile', true);
|
||||
Configure::write('Turnstile', [
|
||||
'enabled' => true,
|
||||
'siteKey' => '2x00000000000000000000BB',
|
||||
'secretKey' => '2x0000000000000000000000000000000AA',
|
||||
]);
|
||||
@@ -178,6 +182,7 @@ class ContactUsFormSubmissionsControllerTest extends TestCase {
|
||||
'cf-turnstile-response' => 'XXXX.DUMMY.TOKEN.XXXX',
|
||||
];
|
||||
$this->post($url, $data);
|
||||
// dd($this->_response);
|
||||
$this->assertResponseCode(200);
|
||||
$cntAfter = $this->ContactUsFormSubmissions->find()->count();
|
||||
$this->assertEquals($cntBefore, $cntAfter);
|
||||
@@ -198,6 +203,7 @@ class ContactUsFormSubmissionsControllerTest extends TestCase {
|
||||
Configure::write('ContactUs.fields', [
|
||||
'captcha' => false,
|
||||
'email' => true,
|
||||
'turnstile' => false,
|
||||
]);
|
||||
Configure::write('ContactUs.email', [
|
||||
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
|
||||
@@ -244,6 +250,7 @@ class ContactUsFormSubmissionsControllerTest extends TestCase {
|
||||
Configure::write('ContactUs.fields', [
|
||||
'captcha' => false,
|
||||
'email' => true,
|
||||
'turnstile' => false,
|
||||
]);
|
||||
Configure::write('ContactUs.email', [
|
||||
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
|
||||
|
||||
+4
-1
@@ -63,6 +63,7 @@ Configure::write('ContactUs', [
|
||||
'fields' => [
|
||||
'captcha' => false,
|
||||
'email' => true,
|
||||
'turnstile' => false,
|
||||
],
|
||||
'email' => [
|
||||
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
|
||||
@@ -72,12 +73,14 @@ Configure::write('ContactUs', [
|
||||
'to' => 'test@example.com',
|
||||
],
|
||||
],
|
||||
'turnstile' => false,
|
||||
// 'turnstile' => [
|
||||
// 'siteKey' => '1x00000000000000000000AA',
|
||||
// 'secretKey' => '1x0000000000000000000000000000000AA',
|
||||
// ],
|
||||
]);
|
||||
Configure::write('Turnstile', [
|
||||
'enabled' => false,
|
||||
]);
|
||||
Configure::write('EmailTransport', [
|
||||
'default' => [
|
||||
'className' => DebugTransport::class,
|
||||
|
||||
Reference in New Issue
Block a user