/**
  * {@inheritdoc}
  */
 public function tearDown(Environment $env, $feature, $skip, TestResult $result)
 {
     $event = new BeforeFeatureTeardown($env, $feature, $result);
     $this->eventDispatcher->dispatch($event::BEFORE_TEARDOWN, $event);
     $teardown = $this->baseTester->tearDown($env, $feature, $skip, $result);
     $event = new AfterFeatureTested($env, $feature, $result, $teardown);
     $this->eventDispatcher->dispatch($event::AFTER, $event);
     return $teardown;
 }
 /**
  * {@inheritdoc}
  */
 public function tearDown(Environment $env, $spec, $skip, TestResult $result)
 {
     $teardown = $this->baseTester->tearDown($env, $spec, $skip, $result);
     if ($skip) {
         return $teardown;
     }
     $scope = new AfterFeatureScope($env, $spec, $result);
     $hookCallResults = $this->hookDispatcher->dispatchScopeHooks($scope);
     return new HookedTeardown($teardown, $hookCallResults);
 }
示例#3
0
 /**
  * {@inheritdoc}
  */
 public function test(Environment $env, SpecificationIterator $iterator, $skip = false)
 {
     $results = array();
     foreach ($iterator as $specification) {
         $setup = $this->specTester->setUp($env, $specification, $skip);
         $localSkip = !$setup->isSuccessful() || $skip;
         $testResult = $this->specTester->test($env, $specification, $localSkip);
         $teardown = $this->specTester->tearDown($env, $specification, $localSkip, $testResult);
         $integerResult = new IntegerTestResult($testResult->getResultCode());
         $results[] = new TestWithSetupResult($setup, $integerResult, $teardown);
     }
     return new TestResults($results);
 }
 public function tearDown(Environment $env, $spec, $skip, TestResult $result)
 {
     return $this->baseTester->tearDown($env, $spec, $skip, $result);
 }