* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Mink context for Behat BDD tool. * Provides Mink integration and base step definitions. * * @author Konstantin Kudryashov */ class MinkContext extends RawMinkContext implements TranslatedContextInterface { /** * Opens specified page. * * @Given /^(?:|I )am on "(?P[^"]+)"$/ * @When /^(?:|I )go to "(?P[^"]+)"$/ */ public function visit($page) { $this->getSession()->visit($this->locatePath($page)); } /** * Reloads current page. * * @When /^(?:|I )reload the page$/ */ public function reload() { $this->getSession()->reload(); } /** * Moves backward one page in history. * * @When /^(?:|I )move backward one page$/ */ public function back() { $this->getSession()->back(); } /** * Moves forward one page in history * * @When /^(?:|I )move forward one page$/ */ public function forward() { $this->getSession()->forward(); } /** * Presses button with specified id|name|title|alt|value. * * @When /^(?:|I )press "(?P