/**
  * {@inheritdoc}
  */
 public function setUp(Environment $env, $feature, $skip)
 {
     $event = new BeforeFeatureTested($env, $feature);
     $this->eventDispatcher->dispatch($event::BEFORE, $event);
     $setup = $this->baseTester->setUp($env, $feature, $skip);
     $event = new AfterFeatureSetup($env, $feature, $setup);
     $this->eventDispatcher->dispatch($event::AFTER_SETUP, $event);
     return $setup;
 }
 /**
  * {@inheritdoc}
  */
 public function setUp(Environment $env, $spec, $skip)
 {
     $setup = $this->baseTester->setUp($env, $spec, $skip);
     if ($skip) {
         return $setup;
     }
     $scope = new BeforeFeatureScope($env, $spec);
     $hookCallResults = $this->hookDispatcher->dispatchScopeHooks($scope);
     return new HookedSetup($setup, $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 setUp(Environment $env, $spec, $skip)
 {
     return $this->baseTester->setUp($env, $spec, $skip);
 }