public function VarbaseContext::__construct in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x
Same name and namespace in other branches
- 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::__construct()
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::__construct()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::__construct()
- 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::__construct()
- 8.7 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::__construct()
Initializes context.
Parameters
array $parameters: Context parameters (set them up through behat.yml or behat.local.yml).
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 40
Class
- VarbaseContext
- Defines application features from the specific context.
Code
public function __construct(array $parameters) {
// Set the list of parameters.
$this->parameters = $parameters;
if (isset($parameters['varbase_users'])) {
$this->varbaseUsers = $parameters['varbase_users'];
foreach ($parameters['varbase_users'] as $varbaseUsername => $varbaseUser) {
$this->users[$varbaseUsername] = $varbaseUser['password'];
}
}
else {
throw new \Exception('behat.yml config files should include "varbase_users" property.');
}
}