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\Contracts\Broadcasting\ShouldBroadcast;
7
8class TestEvent implements ShouldBroadcast
9{
10    public $message;
11
12    public function __construct($message)
13    {
14        $this->message = $message;
15    }
16
17    public function broadcastOn()
18    {
19        return new Channel('test-channel'); // public channel
20    }
21
22    public function broadcastAs()
23    {
24        return 'test-event';
25    }
26}