Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Oct 16, 2023
1 parent 8a0313e commit 112eb67
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PendingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PendingRequest
/**
* Requester constructor.
*
* @param $config
* @param $config
*/
public function __construct(Factory $factory, GatewayInterface $gateway)
{
Expand Down Expand Up @@ -121,7 +121,7 @@ public function request(): RequestedPaymentInterface
public function verify(): CheckedPaymentInterface
{
if ($this->fakeVerification) {
return tap(($this->getGateway()->verifyPayment($this, $this->fakeVerification)), function () {
return tap($this->getGateway()->verifyPayment($this, $this->fakeVerification), function () {
$this->factory->recordPendingRequest($this);
});
}
Expand Down
1 change: 1 addition & 0 deletions tests/Gateways/IDPay/FakeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public function assertion_fails_when_truth_check_is_false()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::fakeRialBasedAmountProvider()
*/
public function can_assert_correct_fake_amount_in_currencies($configCurrency, $actualAmount, Money $expectedAmount)
Expand Down
1 change: 1 addition & 0 deletions tests/Gateways/IDPay/FakeVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ public function assertion_fails_when_truth_check_is_false()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::fakeRialBasedAmountProvider()
*/
public function can_assert_correct_fake_amount_in_currencies($configCurrency, $actualAmount, Money $expectedAmount)
Expand Down
3 changes: 3 additions & 0 deletions tests/Gateways/IDPay/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected function setUp(): void

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::endpointProvider()
*/
public function can_request_payment(bool $sandbox)
Expand Down Expand Up @@ -142,6 +143,7 @@ public function fails_with_server_error()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::clientErrorProvider()
*/
public function fails_with_client_error($httpStatus, $statusCode)
Expand Down Expand Up @@ -195,6 +197,7 @@ public function fails_with_client_error($httpStatus, $statusCode)

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::rialBasedAmountProvider()
*/
public function can_set_amount_in_different_currencies($configCurrency, $actualAmount, $expectedAmountValue)
Expand Down
5 changes: 5 additions & 0 deletions tests/Gateways/IDPay/VerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ protected function setUp(): void

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::endpointProvider()
*/
public function can_verify_manually(bool $sandbox)
Expand Down Expand Up @@ -85,6 +86,7 @@ function (CheckedPayment $request) use ($sandbox) {

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::endpointProvider()
*/
public function can_verify_callback_request(bool $sandbox)
Expand Down Expand Up @@ -142,6 +144,7 @@ public static function badId()

/**
* @test
*
* @dataProvider badId
*/
public function validates_callback_transaction_id($value)
Expand All @@ -160,6 +163,7 @@ public function validates_callback_transaction_id($value)

/**
* @test
*
* @dataProvider badId
*/
public function validates_callback_order_id($value)
Expand Down Expand Up @@ -239,6 +243,7 @@ public function fails_with_server_error()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\IDPay\Provider::clientErrorProvider()
*/
public function fails_with_client_error($httpStatus, $statusCode)
Expand Down
1 change: 1 addition & 0 deletions tests/Gateways/Zarinpal/FakeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public function assertion_fails_when_truth_check_is_false()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::fakeTomanBasedAmountProvider()
*/
public function can_assert_correct_fake_amount_in_currencies($configCurrency, $actualAmount, Money $expectedAmount)
Expand Down
1 change: 1 addition & 0 deletions tests/Gateways/Zarinpal/FakeVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public function assertion_fails_when_truth_check_is_false()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::fakeTomanBasedAmountProvider()
*/
public function can_assert_correct_fake_amount_in_currencies($configCurrency, $actualAmount, Money $expectedAmount)
Expand Down
4 changes: 4 additions & 0 deletions tests/Gateways/Zarinpal/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected function setUp(): void

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::endpointProvider()
*/
public function can_request_payment(bool $sandbox, string $baseUrl)
Expand Down Expand Up @@ -141,6 +142,7 @@ public function fails_with_server_error()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::clientErrorProvider()
*/
public function fails_with_client_error_without_message($httpStatus, $statusCode, $messageKey)
Expand Down Expand Up @@ -193,6 +195,7 @@ public function fails_with_client_error_without_message($httpStatus, $statusCode

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::clientErrorProvider()
*/
public function fails_with_client_error_with_message($httpStatus, $statusCode, $messageKey)
Expand Down Expand Up @@ -256,6 +259,7 @@ public function fails_with_client_error_with_message($httpStatus, $statusCode, $

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::tomanBasedAmountProvider()
*/
public function can_set_amount_in_different_currencies($configCurrency, $actualAmount, $expectedAmountValue)
Expand Down
5 changes: 5 additions & 0 deletions tests/Gateways/Zarinpal/VerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected function setUp(): void

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::endpointProvider()
*/
public function can_verify_manually(bool $sandbox, string $baseUrl)
Expand Down Expand Up @@ -76,6 +77,7 @@ function (CheckedPayment $request) use ($baseUrl) {

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::endpointProvider()
*/
public function can_verify_callback_request(bool $sandbox, string $baseUrl)
Expand Down Expand Up @@ -127,6 +129,7 @@ public static function badTransactionId()

/**
* @test
*
* @dataProvider badTransactionId
*/
public function validates_callback_transaction_id($value)
Expand Down Expand Up @@ -202,6 +205,7 @@ public function fails_with_server_error()

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::clientErrorProvider()
*/
public function fails_with_client_error($httpStatus, $statusCode, $messageKey)
Expand Down Expand Up @@ -243,6 +247,7 @@ public function fails_with_client_error($httpStatus, $statusCode, $messageKey)

/**
* @test
*
* @dataProvider \Evryn\LaravelToman\Tests\Gateways\Zarinpal\Provider::tomanBasedAmountProvider()
*/
public function can_set_amount_in_different_currencies($configCurrency, $actualAmount, $expectedAmountValue)
Expand Down

0 comments on commit 112eb67

Please sign in to comment.