From fc40e0b98a4342b08c35e970a4076ae757982198 Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Mon, 22 Mar 2021 09:03:43 +0100 Subject: [PATCH] Test that email is trimmed --- tests/php/Security/MemberTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/php/Security/MemberTest.php b/tests/php/Security/MemberTest.php index d6dbd4d3d..96a30041b 100644 --- a/tests/php/Security/MemberTest.php +++ b/tests/php/Security/MemberTest.php @@ -1593,4 +1593,12 @@ class MemberTest extends FunctionalTest $this->assertSame('Johnson', $member->getLastName(), 'getLastName should proxy to Surname'); } + + public function testEmailIsTrimmed() + { + $member = new Member(); + $member->Email = " trimmed@test.com\r\n"; + $member->write(); + $this->assertNotNull(Member::get()->find('Email', 'trimmed@test.com')); + } }