Parameters configured in behat.yml
are injected into the main context file via a constructor (in Behat 2):
class FeatureContext extends BehatContext
{
private $parameters;
public function __construct(array $parameters)
{
$this->parameters = $parameters;
}
}
However, since you use @BeforeSuite
, context instance is not yet available (and hook method is static).
You can still fetch parameters from the event:
class FeatureContext extends BehatContext
{
/** @BeforeSuite */
public static function setup(SuiteEvent $event)
{
$parameters = $event->getContextParameters();
}
}
Related docs: http://docs.behat.org/guides/3.hooks.html#suite-hooks