Your FeatureContext
class has to extend BehatContext
and then you get the parameters-array as an argument in the constructor of FeatureContext
. See http://michaelheap.com/behat-selenium2-webdriver/ for an example.
Edit:
class FeatureContext extends BehatContext
{
private $params = array();
public function __construct(array $parameters)
{
$this->params = $parameters;
}
public function iExample($user, $password)
{
$userName = $this->params['user'];
}
}
I haven't used Behat for a while, but you probably get the idea.