mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
API Update to new checkPassword API
This commit is contained in:
parent
54efc6f6bd
commit
ab3f6c0057
@ -4,9 +4,11 @@ namespace SilverStripe\BehatExtension\Context;
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
use Behat\Mink\Element\NodeElement;
|
||||
use SilverStripe\Security\Authenticator;
|
||||
use SilverStripe\Security\Group;
|
||||
use SilverStripe\Security\Member;
|
||||
use SilverStripe\Security\Permission;
|
||||
use SilverStripe\Security\Security;
|
||||
|
||||
/**
|
||||
* LoginContext
|
||||
@ -127,7 +129,10 @@ class LoginContext implements Context
|
||||
/** @var Member $member */
|
||||
$member = Member::get()->filter('Email', $id)->First();
|
||||
assertNotNull($member);
|
||||
assertTrue($member->checkPassword($password)->isValid());
|
||||
$authenticators = Security::singleton()->getApplicableAuthenticators(Authenticator::CHECK_PASSWORD);
|
||||
foreach ($authenticators as $authenticator) {
|
||||
assertTrue($authenticator->checkPassword($member, $password)->isValid());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user