Файл: vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/PendingBatchFake.php
Строк: 49
<?php
namespace IlluminateSupportTestingFakes;
use IlluminateBusPendingBatch;
use IlluminateSupportCollection;
class PendingBatchFake extends PendingBatch
{
/**
* The fake bus instance.
*
* @var IlluminateSupportTestingFakesBusFake
*/
protected $bus;
/**
* Create a new pending batch instance.
*
* @param IlluminateSupportTestingFakesBusFake $bus
* @param IlluminateSupportCollection $jobs
* @return void
*/
public function __construct(BusFake $bus, Collection $jobs)
{
$this->bus = $bus;
$this->jobs = $jobs;
}
/**
* Dispatch the batch.
*
* @return IlluminateBusBatch
*/
public function dispatch()
{
return $this->bus->recordPendingBatch($this);
}
/**
* Dispatch the batch after the response is sent to the browser.
*
* @return IlluminateBusBatch
*/
public function dispatchAfterResponse()
{
return $this->bus->recordPendingBatch($this);
}
}