Skip to content

Commit bdde66b

Browse files
committed
Merge branch 'main' of github.com:NativePHP/laravel
2 parents 393aecc + 1a0ed8f commit bdde66b

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

tests/Http/Controller/DispatchEventFromAppControllerTest.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
use Illuminate\Support\Facades\Event;
44

5-
class TestEvent {
6-
public function __construct(public string $test = '') {
5+
class TestEvent
6+
{
7+
public function __construct(public string $test = '')
8+
{
79

810
}
911
}
1012

11-
it('dispatches an event', function() {
13+
it('dispatches an event', function () {
1214
Event::fake();
1315

1416
$this->withoutMiddleware()
@@ -20,7 +22,7 @@ public function __construct(public string $test = '') {
2022
Event::assertDispatched(TestEvent::class);
2123
});
2224

23-
it('dispatches no event in case it does not exist', function() {
25+
it('dispatches no event in case it does not exist', function () {
2426
Event::fake();
2527

2628
$this->withoutMiddleware()
@@ -31,15 +33,15 @@ public function __construct(public string $test = '') {
3133
Event::assertNotDispatched(InvalidEvent::class);
3234
});
3335

34-
it('passes the payload to the event', function() {
36+
it('passes the payload to the event', function () {
3537
Event::fake();
3638

3739
$this->withoutMiddleware()
3840
->post('_native/api/events', [
3941
'event' => TestEvent::class,
4042
'payload' => [
41-
'test' => 'Some payload string'
42-
]
43+
'test' => 'Some payload string',
44+
],
4345
]);
4446

4547
Event::assertDispatched(TestEvent::class, function ($event) {

tests/Http/Controller/NativeAppBootedControllerTest.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
use Illuminate\Support\Facades\Event;
44
use Native\Laravel\Events\App\ApplicationBooted;
55

6-
class TestProvider {
7-
public function boot() {
6+
class TestProvider
7+
{
8+
public function boot()
9+
{
810

911
}
1012
}
@@ -13,7 +15,7 @@ public function boot() {
1315
Event::fake();
1416

1517
config([
16-
'nativephp.provider' => TestProvider::class
18+
'nativephp.provider' => TestProvider::class,
1719
]);
1820

1921
$this->withoutMiddleware()

tests/TestCase.php

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Native\Laravel\Tests;
44

5-
use Illuminate\Database\Eloquent\Factories\Factory;
65
use Native\Laravel\NativeServiceProvider;
76
use Orchestra\Testbench\TestCase as Orchestra;
87

0 commit comments

Comments
 (0)