Example #1
0
 /**
  * Initizalizes step.
  *
  * @param StepNode $simpleStep Initial step
  * @param array    $tokens     Example table row tokens
  */
 public function __construct(StepNode $simpleStep, array $tokens)
 {
     $text = $this->cleanText = $simpleStep->getText();
     foreach ($tokens as $key => $value) {
         $text = str_replace('<' . $key . '>', $value, $text);
     }
     parent::__construct($simpleStep->getType(), $text, $simpleStep->getLine());
     foreach ($simpleStep->getArguments() as $argument) {
         if ($argument instanceof TableNode || $argument instanceof PyStringNode) {
             $this->addArgument($argument->createExampleRowStepArgument($tokens));
         }
     }
     $this->setParent($simpleStep->getParent());
 }