Merge pull request #68 from sanpii/assert-homepage

Assert homepage
This commit is contained in:
Konstantin Kudryashov
2013-03-09 04:30:42 -08:00
3 changed files with 24 additions and 0 deletions

View File

@@ -197,6 +197,16 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
$this->assertSession()->addressEquals($this->locatePath($page));
}
/**
* Checks, that current page is the homepage.
*
* @Then /^(?:|I )should be on (?:|the )homepage$/
*/
public function assertHomepage()
{
$this->assertSession()->addressEquals($this->locatePath('/'));
}
/**
* Checks, that current page PATH matches regular expression.
*

View File

@@ -263,6 +263,16 @@ trait MinkDictionary
$this->assertSession()->addressEquals($this->locatePath($page));
}
/**
* Checks, that current page is the homepage.
*
* @Then /^(?:|I )should be on (?:|the )homepage$/
*/
public function assertHomepage()
{
$this->assertSession()->addressEquals($this->locatePath('/'));
}
/**
* Checks, that current page PATH matches regular expression.
*