From 4aef64a789946eddb19a9558af3a1bf8b4c2c8d3 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 22 Oct 2013 00:04:15 +0200 Subject: [PATCH] Fixed email link step quoting and selection --- src/SilverStripe/BehatExtension/Context/EmailContext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SilverStripe/BehatExtension/Context/EmailContext.php b/src/SilverStripe/BehatExtension/Context/EmailContext.php index 47f2145..5302ea4 100644 --- a/src/SilverStripe/BehatExtension/Context/EmailContext.php +++ b/src/SilverStripe/BehatExtension/Context/EmailContext.php @@ -81,7 +81,7 @@ class EmailContext extends BehatContext } /** - * @When /^I click on the \'([^\']*)\' link in the email (to|from) "([^"]*)"$/ + * @When /^I click on the "([^"]*)" link in the email (to|from) "([^"]*)"$/ */ public function iGoToInTheEmailTo($linkSelector, $direction, $email) { @@ -91,7 +91,7 @@ class EmailContext extends BehatContext assertNotNull($match); $crawler = new Crawler($match['Content']); - $linkEl = $crawler->filter($linkSelector); + $linkEl = $crawler->selectLink($linkSelector); assertNotNull($linkEl); $link = $linkEl->attr('href'); assertNotNull($link);