|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | use Illuminate\Support\Facades\Event; |
4 | | -use Rappasoft\LaravelPatches\Events\{PatchExecuting, PatchExecuted, PatchFailed, PatchRollingBack, PatchRolledBack}; |
| 4 | +use Rappasoft\LaravelPatches\Events\PatchExecuted; |
| 5 | +use Rappasoft\LaravelPatches\Events\PatchExecuting; |
| 6 | +use Rappasoft\LaravelPatches\Events\PatchFailed; |
| 7 | +use Rappasoft\LaravelPatches\Events\PatchRolledBack; |
| 8 | +use Rappasoft\LaravelPatches\Events\PatchRollingBack; |
5 | 9 | use Rappasoft\LaravelPatches\Patch; |
6 | 10 |
|
7 | | - |
8 | 11 | beforeEach(function () { |
9 | 12 | Event::fake(); |
10 | 13 | }); |
11 | 14 |
|
12 | 15 | test('PatchExecuting event is dispatched with correct data', function () { |
13 | 16 | $patch = new class extends Patch { |
14 | | - public function up() {} |
| 17 | + public function up() |
| 18 | + { |
| 19 | + } |
15 | 20 | }; |
16 | 21 |
|
17 | 22 | event(new PatchExecuting('test_patch', 1, $patch)); |
@@ -58,7 +63,9 @@ public function up() {} |
58 | 63 |
|
59 | 64 | test('PatchRollingBack event is dispatched', function () { |
60 | 65 | $patch = new class extends Patch { |
61 | | - public function down() {} |
| 66 | + public function down() |
| 67 | + { |
| 68 | + } |
62 | 69 | }; |
63 | 70 |
|
64 | 71 | event(new PatchRollingBack('test_patch', $patch)); |
@@ -94,7 +101,9 @@ public function down() {} |
94 | 101 |
|
95 | 102 | test('multiple events can be dispatched in sequence', function () { |
96 | 103 | $patch = new class extends Patch { |
97 | | - public function up() {} |
| 104 | + public function up() |
| 105 | + { |
| 106 | + } |
98 | 107 | }; |
99 | 108 |
|
100 | 109 | event(new PatchExecuting('patch1', 1, $patch)); |
|
0 commit comments