github.com/cs3org/reva/v2@v2.27.7/tests/acceptance/features/bootstrap/RevaContext.php (about) 1 <?php 2 3 use Behat\Behat\Context\Context; 4 use Behat\Behat\Hook\Scope\BeforeScenarioScope; 5 use TestHelpers\AppConfigHelper; 6 use TestHelpers\SetupHelper; 7 8 require_once 'bootstrap.php'; 9 10 /** 11 * Context for Reva specific steps 12 */ 13 class RevaContext implements Context { 14 15 /** 16 * @var FeatureContext 17 */ 18 private $featureContext; 19 20 /** 21 * @BeforeScenario 22 * 23 * @param BeforeScenarioScope $scope 24 * 25 * @return void 26 * @throws Exception 27 */ 28 public function setUpScenario(BeforeScenarioScope $scope) { 29 // Get the environment 30 $environment = $scope->getEnvironment(); 31 // Get all the contexts you need in this context 32 $this->featureContext = $environment->getContext('FeatureContext'); 33 SetupHelper::init( 34 $this->featureContext->getAdminUsername(), 35 $this->featureContext->getAdminPassword(), 36 $this->featureContext->getBaseUrl(), 37 $this->featureContext->getOcPath() 38 ); 39 } 40 }