From cd5b9250d2497495bb2ef5898d68f843edbce3a8 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 22 Jul 2019 13:34:30 +0200 Subject: [PATCH] FIX Ignore project defined password strength rules in MFA unit tests --- .../AccountReset/SecurityExtensionTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/php/Extension/AccountReset/SecurityExtensionTest.php b/tests/php/Extension/AccountReset/SecurityExtensionTest.php index d6669f36..be285627 100644 --- a/tests/php/Extension/AccountReset/SecurityExtensionTest.php +++ b/tests/php/Extension/AccountReset/SecurityExtensionTest.php @@ -18,6 +18,19 @@ class SecurityExtensionTest extends FunctionalTest { protected static $fixture_file = 'SecurityExtensionTest.yml'; + protected function setUp() + { + parent::setUp(); + + $validator = Member::password_validator(); + // Do not let project code rules for password strength break these tests + if ($validator) { + $validator + ->setMinLength(6) + ->setMinTestScore(1); + } + } + public function testResetAccountFailsWhenAlreadyAuthenticated() { /** @var Member&MemberExtension $member */