Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Support\Testing\Fakes;
4
 
5
use Illuminate\Bus\PendingBatch;
6
use Illuminate\Support\Collection;
7
 
8
class PendingBatchFake extends PendingBatch
9
{
10
    /**
11
     * The fake bus instance.
12
     *
13
     * @var \Illuminate\Support\Testing\Fakes\BusFake
14
     */
15
    protected $bus;
16
 
17
    /**
18
     * Create a new pending batch instance.
19
     *
20
     * @param  \Illuminate\Support\Testing\Fakes\BusFake  $bus
21
     * @param  \Illuminate\Support\Collection  $jobs
22
     * @return void
23
     */
24
    public function __construct(BusFake $bus, Collection $jobs)
25
    {
26
        $this->bus = $bus;
27
        $this->jobs = $jobs;
28
    }
29
 
30
    /**
31
     * Dispatch the batch.
32
     *
33
     * @return \Illuminate\Bus\Batch
34
     */
35
    public function dispatch()
36
    {
37
        return $this->bus->recordPendingBatch($this);
38
    }
39
 
40
    /**
41
     * Dispatch the batch after the response is sent to the browser.
42
     *
43
     * @return \Illuminate\Bus\Batch
44
     */
45
    public function dispatchAfterResponse()
46
    {
47
        return $this->bus->recordPendingBatch($this);
48
    }
49
}