public function prepareWordpressDriver($event)
    {
        $drivers = array_keys($this->wordpress->getDrivers());
        $driver  = $this->parameters['default_driver'];
        $tags    = array_merge($event->getFeature()->getTags(), $event->getScenario()->getTags());

        // If the scenario or outline is tagged with a specific driver, switch to it.
        foreach ($tags as $tag) {
            if (! in_array($tag, $drivers, true)) {
                continue;
            }

            $driver = $tag;
            break;
        }

        $this->wordpress->setDefaultDriverName($driver);
    }
public function prepareWordpressDriver($event)
    {
        $drivers = array_keys($this->wordpress->getDrivers());
        $driver  = $this->parameters['default_driver'];
        $tags    = array_merge($event->getFeature()->getTags(), $event->getScenario()->getTags());

        // If the scenario or outline is tagged with a specific driver, switch to it.
        foreach ($tags as $tag) {
            if (! in_array($tag, $drivers, true)) {
                continue;
            }

            $driver = $tag;
            break;
        }

        $this->wordpress->setDefaultDriverName($driver);
    }
public function prepareWordpressDriver ( $ event ) { $ drivers = array_keys ( $ this -> wordpress -> getDrivers ( ) ) ; $ driver = $ this -> parameters [ 'default_driver' ] ; $ tags = array_merge ( $ event -> getFeature ( ) -> getTags ( ) , $ event -> getScenario ( ) -> getTags ( ) ) ; // If the scenario or outline is tagged with a specific driver, switch to it. foreach ( $ tags as $ tag ) { if ( ! in_array ( $ tag , $ drivers , true ) ) { continue ; } $ driver = $ tag ; break ; } $ this -> wordpress -> setDefaultDriverName ( $ driver ) ; }
Configures the driver to use before each scenario or outline.

@param ScenarioLikeTested $event
Configures the driver to use before each scenario or outline .