function it_runs_all_the_buffered_operations(BufferedOperationRunner $bufferedOperationRunner, OperationRunnerRegistry $registry) { $this->beConstructedWith($registry); $registry->findAllByClass(BufferedOperationRunner::class)->willReturn([$bufferedOperationRunner]); $bufferedOperationRunner->runBufferedOperations()->shouldBeCalled(); $this->onKernelTerminate(); }
/** * @Given there is an operation in a buffered runner */ public function thereIsAnOperationInABufferedRunner() { $this->bufferedOperationRunner->run(new Callback(function () { $this->response = 'Buffered operation ran!'; })); }