Added 'Then print current URL'

This commit is contained in:
Jérémy Romey
2013-03-07 11:27:55 +01:00
parent 70d8ae4f97
commit 52a23ed1f2
2 changed files with 20 additions and 0 deletions

View File

@@ -397,6 +397,16 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
$this->assertSession()->elementsCount('css', $element, intval($num)); $this->assertSession()->elementsCount('css', $element, intval($num));
} }
/**
* Prints current URL to console.
*
* @Then /^print current URL$/
*/
public function printCurrentUrl()
{
$this->printDebug($this->getSession()->getCurrentUrl());
}
/** /**
* Prints last response to console. * Prints last response to console.
* *

View File

@@ -463,6 +463,16 @@ trait MinkDictionary
$this->assertSession()->elementsCount('css', $element, intval($num)); $this->assertSession()->elementsCount('css', $element, intval($num));
} }
/**
* Prints current URL to console.
*
* @Then /^print current URL$/
*/
public function printCurrentUrl()
{
$this->printDebug($this->getSession()->getCurrentUrl());
}
/** /**
* Prints last response to console. * Prints last response to console.
* *