Fixed email link step quoting and selection

This commit is contained in:
Ingo Schommer 2013-10-22 00:04:15 +02:00
parent a284e3183d
commit 4aef64a789

View File

@ -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) public function iGoToInTheEmailTo($linkSelector, $direction, $email)
{ {
@ -91,7 +91,7 @@ class EmailContext extends BehatContext
assertNotNull($match); assertNotNull($match);
$crawler = new Crawler($match['Content']); $crawler = new Crawler($match['Content']);
$linkEl = $crawler->filter($linkSelector); $linkEl = $crawler->selectLink($linkSelector);
assertNotNull($linkEl); assertNotNull($linkEl);
$link = $linkEl->attr('href'); $link = $linkEl->attr('href');
assertNotNull($link); assertNotNull($link);