test: get necessary contexts properly

This commit is contained in:
Saw-jan
2024-10-08 12:26:40 +05:45
parent 883d7601b4
commit ca76f79be3
27 changed files with 205 additions and 183 deletions
@@ -28,6 +28,7 @@ use Behat\Gherkin\Node\PyStringNode;
use Psr\Http\Message\ResponseInterface;
use PHPUnit\Framework\Assert;
use TestHelpers\OcsApiHelper;
use TestHelpers\BehatHelper;
require_once 'bootstrap.php';
@@ -51,7 +52,7 @@ class CapabilitiesContext implements Context {
// Get the environment
$environment = $scope->getEnvironment();
// Get all the contexts you need in this context
$this->featureContext = $environment->getContext('FeatureContext');
$this->featureContext = BehatHelper::getContext($scope, $environment, 'FeatureContext');
}
/**