EventFaker   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
c 2
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A eventFaker() 0 7 1
1
<?php
2
3
namespace Sfneal\Testing\Utils\Traits;
4
5
use Illuminate\Support\Facades\Event;
6
7
trait EventFaker
8
{
9
    /**
10
     * Setup Event faking.
11
     *
12
     * @param  array|string  $eventsToFake
13
     * @return void
14
     */
15
    protected function eventFaker($eventsToFake = []): void
16
    {
17
        // Enable event faking
18
        Event::fake($eventsToFake);
19
20
        // Assert that no events were dispatched...
21
        Event::assertNothingDispatched();
22
    }
23
}
24