diff --git a/tests/PivotEventsTest.php b/tests/PivotEventsTest.php index 43d668c..a231827 100644 --- a/tests/PivotEventsTest.php +++ b/tests/PivotEventsTest.php @@ -12,7 +12,7 @@ class PivotEventsTest extends TestCase use RefreshDatabase; /** @test */ - function it_dispatches_pivot_attach_events() + public function it_dispatches_pivot_attach_events() { Event::fake(); @@ -27,12 +27,12 @@ function it_dispatches_pivot_attach_events() 'scopes' => null, ]); - Event::assertDispatched('eloquent.pivotAttaching: ' . User::class); - Event::assertDispatched('eloquent.pivotAttached: ' . User::class); + Event::assertDispatched('eloquent.pivotAttaching: '.User::class); + Event::assertDispatched('eloquent.pivotAttached: '.User::class); } /** @test */ - function it_receives_pivot_changes_for_attach_events() + public function it_receives_pivot_changes_for_attach_events() { $user = $this->createUser(); $role = $this->createRole(); @@ -58,7 +58,7 @@ function it_receives_pivot_changes_for_attach_events() } /** @test */ - function it_dispatches_pivot_detach_events() + public function it_dispatches_pivot_detach_events() { Event::fake(); @@ -73,12 +73,12 @@ function it_dispatches_pivot_detach_events() 'user_id' => $user->id, ]); - Event::assertDispatched('eloquent.pivotDetaching: ' . User::class); - Event::assertDispatched('eloquent.pivotDetached: ' . User::class); + Event::assertDispatched('eloquent.pivotDetaching: '.User::class); + Event::assertDispatched('eloquent.pivotDetached: '.User::class); } /** @test */ - function it_dispatches_pivot_update_events() + public function it_dispatches_pivot_update_events() { Event::fake(); @@ -95,8 +95,8 @@ function it_dispatches_pivot_update_events() 'scopes' => 'orders', ]); - Event::assertDispatched('eloquent.pivotUpdating: ' . User::class); - Event::assertDispatched('eloquent.pivotUpdated: ' . User::class); + Event::assertDispatched('eloquent.pivotUpdating: '.User::class); + Event::assertDispatched('eloquent.pivotUpdated: '.User::class); } protected function createRole(array $overwrites = []) diff --git a/tests/TestCase.php b/tests/TestCase.php index b76164d..896b4b6 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,8 +2,6 @@ namespace Signifly\PivotEvents\Test; -use Exception; -use Illuminate\Support\Facades\Event; use Illuminate\Database\Schema\Blueprint; use Orchestra\Testbench\TestCase as Orchestra;