/**
  * {@inheritdoc}
  */
 public function tearDown(Environment $env, FeatureNode $feature, Scenario $scenario, $skip, TestResult $result)
 {
     $teardown = $this->baseTester->tearDown($env, $feature, $scenario, $skip, $result);
     if ($skip) {
         return $teardown;
     }
     $scope = new AfterScenarioScope($env, $feature, $scenario, $result);
     $hookCallResults = $this->hookDispatcher->dispatchScopeHooks($scope);
     return new HookedTeardown($teardown, $hookCallResults);
 }
 /**
  * {@inheritdoc}
  */
 public function test(Environment $env, FeatureNode $feature, Scenario $scenario, $skip)
 {
     $isolatedEnvironment = $this->envManager->isolateEnvironment($env, $scenario);
     $setup = $this->decoratedTester->setUp($isolatedEnvironment, $feature, $scenario, $skip);
     $localSkip = !$setup->isSuccessful() || $skip;
     $testResult = $this->decoratedTester->test($isolatedEnvironment, $feature, $scenario, $localSkip);
     $teardown = $this->decoratedTester->tearDown($isolatedEnvironment, $feature, $scenario, $localSkip, $testResult);
     $integerResult = new IntegerTestResult($testResult->getResultCode());
     return new TestWithSetupResult($setup, $integerResult, $teardown);
 }
 /**
  * {@inheritdoc}
  */
 public function test(Environment $env, FeatureNode $feature, OutlineNode $outline, $skip = false)
 {
     $results = array();
     foreach ($outline->getExamples() as $example) {
         $setup = $this->scenarioTester->setUp($env, $feature, $example, $skip);
         $localSkip = !$setup->isSuccessful() || $skip;
         $testResult = $this->scenarioTester->test($env, $feature, $example, $localSkip);
         $teardown = $this->scenarioTester->tearDown($env, $feature, $example, $localSkip, $testResult);
         $integerResult = new IntegerTestResult($testResult->getResultCode());
         $results[] = new TestWithSetupResult($setup, $integerResult, $teardown);
     }
     return new TestResults($results);
 }
 /**
  * {@inheritdoc}
  */
 public function tearDown(Environment $env, FeatureNode $feature, Scenario $scenario, $skip, TestResult $result)
 {
     $event = new BeforeScenarioTeardown($env, $feature, $scenario, $result);
     $this->eventDispatcher->dispatch($this->beforeTeardownEventName, $event);
     $teardown = $this->baseTester->tearDown($env, $feature, $scenario, $skip, $result);
     $event = new AfterScenarioTested($env, $feature, $scenario, $result, $teardown);
     $this->eventDispatcher->dispatch($this->afterEventName, $event);
     return $teardown;
 }