Ejemplo n.º 1
0
 /**
  * @param ScenarioInterface $scenario
  *
  * @return string
  */
 private function getTags(ScenarioInterface $scenario)
 {
     if (!$scenario->hasTags()) {
         return $this->indent();
     }
     return $this->indent() . (new Tags())->format($scenario->getTags()) . "\n";
 }
 private function getTags(ScenarioInterface $scenario)
 {
     if (!$scenario->hasTags()) {
         return;
     }
     return (new Tags())->format($scenario->getTags()) . PHP_EOL;
 }
 public function resolve(ScenarioInterface $scenario)
 {
     $scenarioTags = $scenario->getTags();
     foreach ($this->extensionConfiguration['behat_tags'] as $tagConfiguration) {
         if ($this->isConfigurationMatchToTags($tagConfiguration, $scenarioTags)) {
             return $this->createConfiguration($tagConfiguration);
         }
     }
     return null;
 }
 public function createFilename(FeatureNode $feature, ScenarioInterface $scenario, OutlineNode $outline = null)
 {
     return $this->directory . DIRECTORY_SEPARATOR . Transliterator::transliterate(implode($this->separator, $scenario->getTags()), $this->separator);
 }
 /**
  * @param ScenarioInterface $scenario
  *
  * @return bool
  */
 private function isParallelExamples(ScenarioInterface $scenario)
 {
     return $scenario instanceof OutlineNode && in_array(self::TAG_PARALLEL_EXAMPLES, $scenario->getTags());
 }
Ejemplo n.º 6
0
 /**
  * Checks if scenario or outline matches specified filter.
  *
  * @param FeatureNode       $feature  Feature node instance
  * @param ScenarioInterface $scenario Scenario or Outline node instance
  *
  * @return Boolean
  */
 public function isScenarioMatch(FeatureNode $feature, ScenarioInterface $scenario)
 {
     return $this->isTagsMatchCondition(array_merge($feature->getTags(), $scenario->getTags()));
 }