diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php index 95ae8b8..db09151 100644 --- a/src/Behat/MinkExtension/Context/MinkContext.php +++ b/src/Behat/MinkExtension/Context/MinkContext.php @@ -38,8 +38,8 @@ class MinkContext extends RawMinkContext implements TranslatableContext /** * Opens specified page * Example: Given I am on "http://batman.com" - * Example: When I am on "http://batman.com" - * Example: And I go to "http://batman.com" + * Example: And I am on "/articles/isBatmanBruceWayne" + * Example: When I go to "/articles/isBatmanBruceWayne" * * @Given /^(?:|I )am on "(?P[^"]+)"$/ * @When /^(?:|I )go to "(?P[^"]+)"$/ @@ -56,6 +56,7 @@ class MinkContext extends RawMinkContext implements TranslatableContext * Example: And I reload the page * * @When /^(?:|I )reload the page$/ + * */ public function reload() { @@ -118,7 +119,7 @@ class MinkContext extends RawMinkContext implements TranslatableContext /** * Fills in form field with specified id|name|label|value - * Example: Given I fill in "username" with: "bwayne" + * Example: Given I fill in "username" with "bwayne" * Example: When I fill in "username" with: "bwayne" * Example: And I fill in "bwayne" for "username" * @@ -481,6 +482,18 @@ class MinkContext extends RawMinkContext implements TranslatableContext $this->assertSession()->checkboxChecked($this->fixStepArgument($checkbox)); } + /** + * Checks, that (?P\d+) CSS elements exist on the page + * Example: Then I should see 5 "div" elements + * Example: And I should see 5 "div" elements + * + * @Then /^(?:|I )should see (?P\d+) "(?P[^"]*)" elements?$/ + */ + public function assertNumElements($num, $element) + { + $this->assertSession()->elementsCount('css', $element, intval($num)); + } + /** * Checks, that checkbox with specified in|name|label|value is unchecked * Example: Then the "newsletter" checkbox should be unchecked @@ -496,18 +509,6 @@ class MinkContext extends RawMinkContext implements TranslatableContext $this->assertSession()->checkboxNotChecked($this->fixStepArgument($checkbox)); } - /** - * Checks, that (?P\d+) CSS elements exist on the page - * Example: Then I should see 5 "div" elements - * Example: And I should see 5 "div" elements - * - * @Then /^(?:|I )should see (?P\d+) "(?P[^"]*)" elements?$/ - */ - public function assertNumElements($num, $element) - { - $this->assertSession()->elementsCount('css', $element, intval($num)); - } - /** * Prints current URL to console. * Example: Then print current URL