예제 #1
0
 function it_should_add_active_steps(StepInterface $step, ProcessScenarioInterface $scenario)
 {
     $step->getName()->willReturn(null);
     $this->build($scenario);
     $step->isActive()->willReturn(true);
     $step->setName('foobar')->shouldBeCalled();
     $this->add('foobar', $step);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function addStep($name, StepInterface $step)
 {
     if ($this->hasStep($name)) {
         throw new \InvalidArgumentException(sprintf('Step with name "%s" already exists', $name));
     }
     if (null === $step->getName()) {
         $step->setName($name);
     }
     $this->steps[$name] = $this->orderedSteps[] = $step;
 }