Skip to content

Commit

Permalink
Align tests with exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
r-kujawa committed Aug 18, 2023
1 parent a4b1dd3 commit c2586ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Unit/TestPaymentGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function setting_invalid_driver_throws_exception()
config(['payment.defaults.driver' => 'invalid']);

$this->expectException(Exception::class);
$this->expectExceptionMessage('Invalid checkout driver provided.');
$this->expectExceptionMessage('Invalid driver provided.');

Payment::authorize([]);
}
Expand All @@ -38,7 +38,7 @@ public function setting_invalid_driver_throws_exception()
public function setting_invalid_provider_throws_exception()
{
$this->expectException(Exception::class);
$this->expectExceptionMessage('Invalid checkout provider.');
$this->expectExceptionMessage('Invalid provider.');

Payment::setProvider('invalid');
}
Expand All @@ -47,7 +47,7 @@ public function setting_invalid_provider_throws_exception()
public function setting_invalid_merchant_throws_exception()
{
$this->expectException(Exception::class);
$this->expectExceptionMessage('Invalid checkout merchant.');
$this->expectExceptionMessage('Invalid merchant.');

Payment::setMerchant('invalid');
}
Expand Down Expand Up @@ -80,7 +80,7 @@ public function payment_service_throws_exception_when_test_mode_gateway_does_not
config(['payment.test_mode' => true]);

$this->expectException(Exception::class);
$this->expectExceptionMessage('The App\\Services\\Payment\\FakePaymentRequest::class does not exist.');
$this->expectExceptionMessage('You must set a request_class for the Test Checkout provider.');

Payment::authorize([]);
}
Expand Down

0 comments on commit c2586ec

Please sign in to comment.