-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
); | ||
} | ||
} |