Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Update unit test to work with framework 4.9 #1097

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Aug 20, 2021

// no space addresses is for framework 4.9 which does trim() email addresses
$to = '[email protected]; [email protected]';
$from = '[email protected]; [email protected]';
$found = (bool)static::findEmail($to, $from, 'Test Email');
Copy link
Contributor

Choose a reason for hiding this comment

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

why not adjust findEmail() rather than adding this condition

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, I'll do that and close this PR

@emteknetnz
Copy link
Member Author

Closed in favour of updating findEmail() in silverstripe/silverstripe-framework#10065

@emteknetnz emteknetnz closed this Aug 23, 2021
@emteknetnz
Copy link
Member Author

Turns out we still need this even after merging the framework PR as userforms is still failing https://app.travis-ci.com/github/silverstripe/silverstripe-userforms/jobs/534130373

@emteknetnz emteknetnz reopened this Sep 6, 2021
Copy link

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

I think the problem is that the other PR only sanitises the "To" field. The From field should be sanitise as well. The current test passes when I run it against this PR: silverstripe/silverstripe-framework#10089

@emteknetnz emteknetnz closed this Sep 9, 2021
@emteknetnz
Copy link
Member Author

Nope this PR is still needed after retriggering build after the other PR was merged. Also that other fix won't fix it for framework 4.8 or lower

@emteknetnz emteknetnz reopened this Sep 12, 2021
@maxime-rainville
Copy link

Both the 5.10 and 5 builds are green now.

4.8 will still be using the old Swiftmailer 5 implementation, so it won't need the fix anyway.

@emteknetnz emteknetnz closed this Sep 13, 2021
@maxime-rainville maxime-rainville deleted the pulls/5.9/fix-unit-test branch September 13, 2021 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants