Skip to content

Commit

Permalink
add formerly removed RevaContext
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Oct 18, 2021
1 parent 95112ee commit 72cb487
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ default:
ldapGroupsOU: TestGroups
ldapInitialUserFilePath: /../../config/ldap-users.ldif
contexts:
- RevaContext:
- OccContext:
- FeatureContext: &common_feature_context_params
baseUrl: http://localhost:8080
Expand Down
40 changes: 40 additions & 0 deletions tests/acceptance/features/bootstrap/RevaContext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use TestHelpers\AppConfigHelper;
use TestHelpers\SetupHelper;

require_once 'bootstrap.php';

/**
* Context for Reva specific steps
*/
class RevaContext implements Context {

/**
* @var FeatureContext
*/
private $featureContext;

/**
* @BeforeScenario
*
* @param BeforeScenarioScope $scope
*
* @return void
* @throws Exception
*/
public function setUpScenario(BeforeScenarioScope $scope) {
// Get the environment
$environment = $scope->getEnvironment();
// Get all the contexts you need in this context
$this->featureContext = $environment->getContext('FeatureContext');
SetupHelper::init(
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
$this->featureContext->getBaseUrl(),
$this->featureContext->getOcPath()
);
}
}

0 comments on commit 72cb487

Please sign in to comment.