Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
TestEvent
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 broadcastOn
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 broadcastAs
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Events;
4
5use Illuminate\Broadcasting\Channel;
6use Illuminate\Broadcasting\InteractsWithSockets;
7use Illuminate\Broadcasting\PresenceChannel;
8use Illuminate\Broadcasting\PrivateChannel;
9use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
10use Illuminate\Foundation\Events\Dispatchable;
11use Illuminate\Queue\SerializesModels;
12
13class TestEvent implements ShouldBroadcast
14{
15    public $message;
16
17    public function __construct($message)
18    {
19        $this->message = $message;
20    }
21
22    public function broadcastOn()
23    {
24        return new Channel('test-channel'); // public channel
25    }
26
27    public function broadcastAs()
28    {
29        return 'test-event';
30    }
31}