Пример #1
0
 function it_should_call_the_callable(Operation $operation)
 {
     $operation->run()->shouldBeCalled();
     $this->beConstructedWith(function () use($operation) {
         $operation->getWrappedObject()->run();
     });
     $this->run();
 }
 function it_runs_the_operations_already_in_the_buffer(OperationRunner $runner, Operation $first, Operation $second)
 {
     $buffer = new OperationBuffer\InMemoryOperationBuffer();
     $buffer->add($first->getWrappedObject());
     $this->beConstructedWith($runner, $buffer);
     $this->run($second);
     $runner->run($first)->shouldBeCalled();
     $runner->run($second)->shouldBeCalled();
 }
 function it_should_run_an_operation(Operation $operation)
 {
     $operation->run()->shouldBeCalled();
     $this->run($operation);
 }
 /**
  * {@inheritdoc}
  */
 public function run(Operation $operation)
 {
     return $operation->run();
 }