/**
  * @BeforeStep
  */
 public function debugStepsBefore(BeforeStepScope $scope)
 {
     // Tests tagged with @debugBeforeEach will wait for [ENTER] before running each step.
     if ($this->scenario->hasTag('debugBeforeEach')) {
         $env = $scope->getEnvironment();
         $drupalContext = $env->getContext('Drupal\\DrupalExtension\\Context\\DrupalContext');
         $drupalContext->iPutABreakpoint();
     }
 }
 /**
  * @BeforeStep
  **/
 public function BackgroundDispatcher(BeforeStepScope $event)
 {
     $feature = $event->getFeature();
     $background = $feature->getBackground() ?: null;
     $steps = null === $background ? [] : $background->getSteps();
     $underBackground = in_array($event->getStep(), $steps);
     if (null === $background && false === $this->afterBackground) {
         $this->displachEvent($this->HOOK_BEFORE_BACKGROUND, $event);
         $this->displachEvent($this->HOOK_AFTER_BACKGROUND, $event);
         $this->afterBackground = true;
     } elseif ($underBackground !== $this->inBackground) {
         if (true === $underBackground) {
             $this->displachEvent($this->HOOK_BEFORE_BACKGROUND, $event);
         } else {
             $this->displachEvent($this->HOOK_AFTER_BACKGROUND, $event);
         }
         $this->inBackground = $underBackground;
     }
 }
 /**
  * @BeforeStep
  */
 public function trackLastStep(BeforeStepScope $scope)
 {
     // Tests tagged with @debugBeforeEach will wait for [ENTER] before running each step.
     $this->lastStep = $scope->getStep();
 }