added concrete FeatureContext example
This commit is contained in:
19
README.md
19
README.md
@@ -78,6 +78,25 @@ be automatically called **immediately after** each context creation before each
|
|||||||
this `$mink` instance will be preconfigured based on the settings you've provided in your
|
this `$mink` instance will be preconfigured based on the settings you've provided in your
|
||||||
`behat.yml`.
|
`behat.yml`.
|
||||||
|
|
||||||
|
Concrete `FeatureContext` example:
|
||||||
|
|
||||||
|
``` php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Behat\MinkExtension\Context\MinkContext;
|
||||||
|
|
||||||
|
class FeatureContext extends MinkContext
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @Then /^I wait for the suggestion box to appear$/
|
||||||
|
*/
|
||||||
|
public function iWaitForTheSuggestionBoxToAppear()
|
||||||
|
{
|
||||||
|
$this->getSession()->wait(5000, "$('.suggestions-results').children().length > 0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Copyright
|
Copyright
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user