Skip to content

Commit 81f370a

Browse files
committed
test(Channels): update BarkChannel
- Update BarkChannel to use Mockery for creating mock Client - Change expectation to toBeNull
1 parent 632baae commit 81f370a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/Channels/NotifyChannelTest.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@
2929
use Illuminate\Support\Str;
3030

3131
it('can report', function (): void {
32-
$mockClient = Mockery::mock(Client::class);
33-
$mockClient->allows('send')->andReturn('report');
34-
35-
expect(new BarkChannel($mockClient))
36-
->report('report')->toBe('report');
32+
expect(new BarkChannel(
33+
Mockery::spy(Client::class)->allows('send')->once()->getMock()
34+
))->report('report')->toBeNull();
3735
})->group(__DIR__, __FILE__);
3836

3937
it('can create message', function (): void {

0 commit comments

Comments
 (0)