From 353349551e130eb8ef8836de2e3e4e445c1ecf39 Mon Sep 17 00:00:00 2001 From: Sajjad Hossain Date: Sun, 5 Apr 2015 22:32:16 -0400 Subject: [PATCH 1/4] added example snippets in MinkExtenstion to be used with 'vendor/bin/behat -di' as definitions --- .../MinkExtension/Context/MinkContext.php | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php index 90ea0380..1109111c 100644 --- a/src/Behat/MinkExtension/Context/MinkContext.php +++ b/src/Behat/MinkExtension/Context/MinkContext.php @@ -26,6 +26,11 @@ class MinkContext extends RawMinkContext implements TranslatableContext * * @Given /^(?:|I )am on (?:|the )homepage$/ * @When /^(?:|I )go to (?:|the )homepage$/ + * + * Example: Given I am on the homepage + * Example: And I am on the homepage + * Example: When I go to the homepage + * */ public function iAmOnHomepage() { @@ -37,6 +42,11 @@ public function iAmOnHomepage() * * @Given /^(?:|I )am on "(?P[^"]+)"$/ * @When /^(?:|I )go to "(?P[^"]+)"$/ + * + * Example: Given I am on "/articles/isBatmanBruceWayne" + * Example: And I am on "/articles/isBatmanBruceWayne" + * Example: When I go to "/articles/isBatmanBruceWayne" + * */ public function visit($page) { @@ -47,6 +57,10 @@ public function visit($page) * Reloads current page. * * @When /^(?:|I )reload the page$/ + * + * Example: And I relod the page + * Example: When I reload the page + * */ public function reload() { @@ -57,6 +71,10 @@ public function reload() * Moves backward one page in history. * * @When /^(?:|I )move backward one page$/ + * + * Example: And I move backward one page + * Example: When I move backward one page + * */ public function back() { @@ -67,6 +85,10 @@ public function back() * Moves forward one page in history * * @When /^(?:|I )move forward one page$/ + * + * Example: And I move forward one page + * Example: When I move forward one page + * */ public function forward() { @@ -77,6 +99,10 @@ public function forward() * Presses button with specified id|name|title|alt|value. * * @When /^(?:|I )press "(?P