As docs say:
parameters is a simple array that will be passed into the
constructor of your context class when instantiated, which happens
before each scenario.
That means that parameters defined in your behat.yml
:
default:
context:
parameters:
my_parameter: my_value
are passed to your context via a constructor:
class FeatureContext extends RawMinkContext
{
private $parameters = array();
public function __construct(array $parameters)
{
$this->parameters = $parameters;
}
}
If your intention was to alter parameters from the Symfony container, you should rather do it in one of the Symfony configuration files (you should be running behat agains test environment, this way configuration is separate from dev and prod).