Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/Model/Recipient/EmailRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ public function canSend($data, $form)
public function emailTemplateExists($template = '')
{
$t = ($template ? $template : $this->EmailTemplate);

$t = $t ?? '';
return array_key_exists($t, (array) $this->getEmailTemplateDropdownValues());
}

Expand Down
1 change: 1 addition & 0 deletions tests/behat/features/userforms.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Feature: Userforms
Then I drag the ".ss-gridfield-item[data-id='4'] .handle" element to the ".ss-gridfield-item[data-id='6'] .handle" element
And I wait for 1 seconds
And I press the "Publish" button
And I wait for 1 seconds
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test was sporadically failing so added a small delay

And I dismiss all toasts

# Add email recipient with custom text and custom rules
Expand Down
2 changes: 0 additions & 2 deletions tests/php/Control/UserDefinedFormControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,6 @@ public function testValidEmailsToArray(array $input, array $expected)
{
$class = new ReflectionClass(UserDefinedFormController::class);
$method = $class->getMethod('validEmailsToArray');
$method->setAccessible(true);

$controller = new UserDefinedFormController();

$this->assertEquals($expected, $method->invokeArgs($controller, $input));
Expand Down
4 changes: 2 additions & 2 deletions tests/php/Model/EditableFormField/EditableFileFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testOnBeforeWrite()
$defaultFolder = Folder::find('Form-submissions');
$this->assertNotEmpty($defaultFolder, 'Default Folder was created along with the EditableFileField');
$this->assertFalse($defaultFolder->canView(), 'Default Folder default to being restricted');
$this->assertFalse((boolean)$fileField->FolderConfirmed, 'EditableFileField are not Folder Confirmed initially');
$this->assertFalse((bool) $fileField->FolderConfirmed, 'EditableFileField are not Folder Confirmed initially');

$this->assertEquals(
$defaultFolder->ID,
Expand All @@ -95,7 +95,7 @@ public function testOnBeforeWrite()
$fileField->FolderID = Folder::find_or_make('boom')->ID;
$fileField->write();
$this->assertTrue(
(boolean)$fileField->FolderConfirmed,
(bool) $fileField->FolderConfirmed,
'EditableFileField are Folder Confirmed once you assigned them a folder'
);

Expand Down