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(); }