fix: 🐛 fix linters
This commit is contained in:
parent
f2fb5d8a23
commit
65e834a06e
1 changed files with 6 additions and 5 deletions
|
|
@ -81,7 +81,7 @@ describe('reject campaign request use case', function (): void {
|
|||
$repository = \Mockery::mock(CampaignRequestRepository::class);
|
||||
$repository->shouldReceive('findById')->once()->with($id)->andReturn($campaignRequest);
|
||||
$repository->shouldReceive('save')->once()->with(\Mockery::on(
|
||||
fn(CampaignRequest $saved): bool => $saved->status === CampaignRequestStatus::REJECTED
|
||||
fn (CampaignRequest $saved): bool => $saved->status === CampaignRequestStatus::REJECTED
|
||||
&& $saved->rejectionReason === $reason
|
||||
&& $saved->updatedAt !== null,
|
||||
));
|
||||
|
|
@ -137,7 +137,7 @@ describe('reject campaign request use case', function (): void {
|
|||
$useCase = new RejectCampaignRequest($repository);
|
||||
|
||||
// WHEN
|
||||
$action = fn(): Output => $useCase->execute(
|
||||
$action = fn (): Output => $useCase->execute(
|
||||
new Input(id: $id, reason: new RejectionReason('Missing legal documents.'))
|
||||
);
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ describe('reject campaign request use case', function (): void {
|
|||
describe('reject campaign request use case assertions', function (): void {
|
||||
it('cannot build an input to reject a campaign request without a reason', function (): void {
|
||||
// WHEN
|
||||
$action = fn(): Input => new Input(id: CampaignRequestId::generate());
|
||||
$action = fn (): Input => new Input(id: CampaignRequestId::generate());
|
||||
|
||||
// THEN
|
||||
expect($action)->toThrow(\ArgumentCountError::class);
|
||||
|
|
@ -158,11 +158,12 @@ describe('reject campaign request use case assertions', function (): void {
|
|||
// GIVEN
|
||||
$repository = \Mockery::mock(CampaignRequestRepository::class);
|
||||
$useCase = new RejectCampaignRequest($repository);
|
||||
$invalidInput = new class () implements BaseInput {
|
||||
$invalidInput = new class () implements BaseInput
|
||||
{
|
||||
};
|
||||
|
||||
// WHEN
|
||||
$action = fn(): Output => $useCase->execute($invalidInput);
|
||||
$action = fn (): Output => $useCase->execute($invalidInput);
|
||||
|
||||
// THEN
|
||||
expect($action)->toThrow(\InvalidArgumentException::class);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue