From a284e3183d04793d07075259f1c544a842a78f4c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 22 Oct 2013 00:04:04 +0200 Subject: [PATCH] New "password should be" step --- .../BehatExtension/Context/LoginContext.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/SilverStripe/BehatExtension/Context/LoginContext.php b/src/SilverStripe/BehatExtension/Context/LoginContext.php index 0f31137..baf2f74 100644 --- a/src/SilverStripe/BehatExtension/Context/LoginContext.php +++ b/src/SilverStripe/BehatExtension/Context/LoginContext.php @@ -160,4 +160,14 @@ class LoginContext extends BehatContext assertNotNull($badMessage, 'Bad message not found.'); } + + /** + * @Then /^the password for "([^"]*)" should be "([^"]*)"$/ + */ + public function stepPasswordForEmailShouldBe($id, $password) + { + $member = \Member::get()->filter('Email', $id)->First(); + assertNotNull($member); + assertTrue($member->checkPassword($password)); + } }