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); }
/** * {@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; }