/**
  * @param string $locator
  *
  * @return FeatureNode[]
  */
 public function extract($locator)
 {
     $features = [];
     $specifications = $this->findSuitesSpecifications($locator);
     foreach (GroupedSpecificationIterator::group($specifications) as $iterator) {
         foreach ($iterator as $featureNode) {
             $features[] = $featureNode;
         }
     }
     return $features;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function test(array $iterators, $skip = false)
 {
     $results = array();
     foreach (GroupedSpecificationIterator::group($iterators) as $iterator) {
         $environment = $this->envManager->buildEnvironment($iterator->getSuite());
         $setup = $this->suiteTester->setUp($environment, $iterator, $skip);
         $localSkip = !$setup->isSuccessful() || $skip;
         $testResult = $this->suiteTester->test($environment, $iterator, $localSkip);
         $teardown = $this->suiteTester->tearDown($environment, $iterator, $localSkip, $testResult);
         $integerResult = new IntegerTestResult($testResult->getResultCode());
         $results[] = new TestWithSetupResult($setup, $integerResult, $teardown);
     }
     return new TestResults($results);
 }