public function prepareDefaultDrupalDriver($event)
    {
        $feature = $event->getFeature();
        $scenario = $event instanceof ScenarioLikeTested ? $event->getScenario() : $event->getOutline();

        // Get the default driver.
        $driver = $this->parameters['default_driver'];

        foreach (array_merge($feature->getTags(), $scenario->getTags()) as $tag) {
            if (!empty($this->parameters[$tag . '_driver'])) {
                $driver = $this->parameters[$tag . '_driver'];
            }
        }

        // Set the default driver.
        $this->drupal->setDefaultDriverName($driver);

        // Set the environment.
        $environment = $event->getEnvironment();
        $this->drupal->setEnvironment($environment);
    }
public function prepareDefaultDrupalDriver($event)
    {
        $feature = $event->getFeature();
        $scenario = $event instanceof ScenarioLikeTested ? $event->getScenario() : $event->getOutline();

        // Get the default driver.
        $driver = $this->parameters['default_driver'];

        foreach (array_merge($feature->getTags(), $scenario->getTags()) as $tag) {
            if (!empty($this->parameters[$tag . '_driver'])) {
                $driver = $this->parameters[$tag . '_driver'];
            }
        }

        // Set the default driver.
        $this->drupal->setDefaultDriverName($driver);

        // Set the environment.
        $environment = $event->getEnvironment();
        $this->drupal->setEnvironment($environment);
    }
public function prepareDefaultDrupalDriver ( $ event ) { $ feature = $ event -> getFeature ( ) ; $ scenario = $ event instanceof ScenarioLikeTested ? $ event -> getScenario ( ) : $ event -> getOutline ( ) ; // Get the default driver. $ driver = $ this -> parameters [ 'default_driver' ] ; foreach ( array_merge ( $ feature -> getTags ( ) , $ scenario -> getTags ( ) ) as $ tag ) { if ( ! empty ( $ this -> parameters [ $ tag . '_driver' ] ) ) { $ driver = $ this -> parameters [ $ tag . '_driver' ] ; } } // Set the default driver. $ this -> drupal -> setDefaultDriverName ( $ driver ) ; // Set the environment. $ environment = $ event -> getEnvironment ( ) ; $ this -> drupal -> setEnvironment ( $ environment ) ; }
Configures default Drupal driver to use before each scenario or outline.

`@api` tagged scenarios will get the `api_driver` as the default driver.

Other scenarios get the `default_driver` as the default driver.

@param ScenarioEvent|OutlineEvent $event
Configures default Drupal driver to use before each scenario or outline .