From fcdfb048257b6ec9c6349fbb910cbb95f327ab1b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 6 Jan 2015 13:54:01 +1300 Subject: [PATCH] More complex password default to comply with custom authenticators Changed from 'secret' to 'Secret!123'. For example, the CWP default configuration increases the required complexity to include uppercase letters, see https://gitlab.cwp.govt.nz/cwp/cwp-core/blob/master/_config.php#L134 This should not impact existing tests since the password is only used indirectly, through "Given I login with ADMIN permissions". --- src/SilverStripe/BehatExtension/Context/LoginContext.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SilverStripe/BehatExtension/Context/LoginContext.php b/src/SilverStripe/BehatExtension/Context/LoginContext.php index 9735ebd..81fb553 100644 --- a/src/SilverStripe/BehatExtension/Context/LoginContext.php +++ b/src/SilverStripe/BehatExtension/Context/LoginContext.php @@ -98,7 +98,8 @@ class LoginContext extends BehatContext $member->FirstName = $permCode; $member->Surname = "User"; $member->Email = "$permCode@example.org"; - $member->changePassword('secret'); + $member->PasswordEncryption = "none"; + $member->changePassword('Secret!123'); $member->write(); $group->Members()->add($member); \Member::set_password_validator($validator); @@ -106,7 +107,7 @@ class LoginContext extends BehatContext $this->cache_generatedMembers[$permCode] = $member; } - return new Step\Given(sprintf('I log in with "%s" and "%s"', "$permCode@example.org", 'secret')); + return new Step\Given(sprintf('I log in with "%s" and "%s"', "$permCode@example.org", 'Secret!123')); } /**