Introduce RawMinkContext::visitPath() helper method
This commit is contained in:
@@ -29,7 +29,7 @@ class MinkContext extends RawMinkContext implements TranslatableContext
|
||||
*/
|
||||
public function iAmOnHomepage()
|
||||
{
|
||||
$this->getSession()->visit($this->locatePath('/'));
|
||||
$this->visitPath('/');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ class MinkContext extends RawMinkContext implements TranslatableContext
|
||||
*/
|
||||
public function visit($page)
|
||||
{
|
||||
$this->getSession()->visit($this->locatePath($page));
|
||||
$this->visitPath($page);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -113,6 +113,17 @@ class RawMinkContext implements MinkAwareContext
|
||||
return $this->getMink()->assertSession($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits provided relative path using provided or default session.
|
||||
*
|
||||
* @param string $path
|
||||
* @param string|null $sessionName
|
||||
*/
|
||||
public function visitPath($path, $sessionName = null)
|
||||
{
|
||||
$this->getSession($sessionName)->visit($this->locatePath($path));
|
||||
}
|
||||
|
||||
/**
|
||||
* Locates url, based on provided path.
|
||||
* Override to provide custom routing mechanism.
|
||||
|
||||
Reference in New Issue
Block a user