test: get necessary contexts properly
This commit is contained in:
@@ -22,10 +22,11 @@
|
||||
|
||||
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use Behat\Behat\Context\Context;
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use PHPUnit\Framework\Assert;
|
||||
use TestHelpers\CliHelper;
|
||||
use TestHelpers\OcisConfigHelper;
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use TestHelpers\BehatHelper;
|
||||
|
||||
/**
|
||||
* CLI context
|
||||
@@ -41,12 +42,12 @@ class CliContext implements Context {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUpScenario(BeforeScenarioScope $scope): void {
|
||||
public function before(BeforeScenarioScope $scope): void {
|
||||
// Get the environment
|
||||
$environment = $scope->getEnvironment();
|
||||
// Get all the contexts you need in this context
|
||||
$this->featureContext = $environment->getContext('FeatureContext');
|
||||
$this->spacesContext = $environment->getContext('SpacesContext');
|
||||
$this->featureContext = BehatHelper::getContext($scope, $environment, 'FeatureContext');
|
||||
$this->spacesContext = BehatHelper::getContext($scope, $environment, 'SpacesContext');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user