Tolerance\Operation\Runner\BufferedOperationRunner::runBufferedOperations PHP Method

runBufferedOperations() public method

It returns an array of results.
public runBufferedOperations ( ) : mixed[]
return mixed[]
    public function runBufferedOperations()
    {
        $results = [];
        while (null !== ($operation = $this->buffer->current())) {
            $results[] = $this->runner->run($operation);
            $this->buffer->pop();
        }
        return $results;
    }

Usage Example

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