Skip to content

Commit

Permalink
test(Channels): update BarkChannel
Browse files Browse the repository at this point in the history
- Update BarkChannel to use Mockery for creating mock Client
- Change expectation to toBeNull
  • Loading branch information
guanguans committed Aug 20, 2023
1 parent 632baae commit 81f370a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/Channels/NotifyChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
use Illuminate\Support\Str;

it('can report', function (): void {
$mockClient = Mockery::mock(Client::class);
$mockClient->allows('send')->andReturn('report');

expect(new BarkChannel($mockClient))
->report('report')->toBe('report');
expect(new BarkChannel(
Mockery::spy(Client::class)->allows('send')->once()->getMock()
))->report('report')->toBeNull();
})->group(__DIR__, __FILE__);

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

0 comments on commit 81f370a

Please sign in to comment.