コード例 #1
0
 /**
  * @param FeatureNode $featureNode
  *
  * @return int
  */
 public function run(FeatureNode $featureNode)
 {
     $result = 0;
     $this->eventDispatcher->dispatch(ParallelScenarioEventType::FEATURE_TESTED_BEFORE);
     $scenarioGroups = $this->scenarioInfoExtractor->extract($featureNode);
     foreach ($scenarioGroups as $scenarios) {
         $result = max($result, $this->runScenarios($scenarios));
     }
     $this->eventDispatcher->dispatch(ParallelScenarioEventType::FEATURE_TESTED_BEFORE);
     return $result;
 }
 /**
  * @param FeatureNode $feature
  * @param array       $expected
  *
  * @dataProvider provider
  */
 public function test(FeatureNode $feature, array $expected)
 {
     $extractor = new ScenarioInfoExtractor();
     $result = $extractor->extract($feature);
     $this->assertEquals($expected, $result);
 }