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\Contracts\Broadcasting\ShouldBroadcast;
8use Illuminate\Foundation\Events\Dispatchable;
9use Illuminate\Queue\SerializesModels;
10
11class TestEvent implements ShouldBroadcast
12{
13    use Dispatchable, InteractsWithSockets, SerializesModels;
14
15    public function __construct(public $message)
16    {
17    }
18
19    public function broadcastOn()
20    {
21        return new Channel('test-channel'); // public channel
22    }
23
24    public function broadcastAs(): string
25    {
26        return 'test-event';
27    }
28}