execute() public method

Executes a step logic.
public execute ( Sonata\NotificationBundle\Consumer\ConsumerEvent $event, string $directory ) : integer
$event Sonata\NotificationBundle\Consumer\ConsumerEvent
$directory string
return integer the exit status (0 if successful, non-zero otherwise)
 public function it_interrupt_the_execution_of_steps_when_any_of_them_return_non_zero_status(ConsumerEvent $event, StepInterface $step1, StepInterface $step2)
 {
     $this->beConstructedWith(array($step1, $step2));
     $step1->execute($event, Argument::type('string'))->shouldBeCalled()->willReturn(5);
     $step2->execute(Argument::any(), Argument::any())->shouldNotBeCalled();
     $this->process($event)->shouldReturn(5);
 }