Skip to content

Commit

Permalink
PhpStan is getting too smart
Browse files Browse the repository at this point in the history
  • Loading branch information
Daaarkling authored and janlanger committed Nov 7, 2022
1 parent 0378b04 commit 89bac0b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions tests/unit/Call/ApplePay/EchoApplePayRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public function testSend(): void
self::assertSame(ResultCode::C0_OK, $response->getResultCode());
self::assertSame('OK', $response->getResultMessage());
self::assertSame(Country::CZE, $response->getInitParams()?->getCountryCode());
self::assertSame(['visa', 'masterCard', 'maestro'], $response->getInitParams()?->getSupportedNetworks());
self::assertSame(['supports3DS'], $response->getInitParams()?->getMerchantCapabilities());
self::assertSame(['visa', 'masterCard', 'maestro'], $response->getInitParams()->getSupportedNetworks());
self::assertSame(['supports3DS'], $response->getInitParams()->getMerchantCapabilities());
}

}
4 changes: 2 additions & 2 deletions tests/unit/Call/ApplePay/InitApplePayRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public function testSend(): void
self::assertNull($response->getStatusDetail());
self::assertNull($response->getActions()?->getAuthenticate());
self::assertSame('A000000003', $response->getActions()?->getFingerprint()?->getSdkInit()?->getDirectoryServerID());
self::assertSame('Visa', $response->getActions()?->getFingerprint()?->getSdkInit()?->getSchemeId());
self::assertSame('2.2.0', $response->getActions()?->getFingerprint()?->getSdkInit()?->getMessageVersion());
self::assertSame('Visa', $response->getActions()->getFingerprint()->getSdkInit()->getSchemeId());
self::assertSame('2.2.0', $response->getActions()->getFingerprint()->getSdkInit()->getMessageVersion());
}

}
4 changes: 2 additions & 2 deletions tests/unit/Call/Button/PaymentButtonRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public function testSend(): void
self::assertSame('OK', $response->getResultMessage());
self::assertSame(PaymentStatus::S1_CREATED, $response->getPaymentStatus());
self::assertSame('https://platebnibrana.csob.cz/pay/vasobchod.cz/2c72d818-9788-45a1-878a-9db2a706edc5/pt-detect/csob', $response->getRedirect()?->getUrl());
self::assertSame(HttpMethod::GET, $response->getRedirect()?->getMethod());
self::assertNull($response->getRedirect()?->getParams());
self::assertSame(HttpMethod::GET, $response->getRedirect()->getMethod());
self::assertNull($response->getRedirect()->getParams());
}

}
6 changes: 3 additions & 3 deletions tests/unit/Call/GooglePay/EchoGooglePayRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public function testSend(): void
self::assertSame(ResultCode::C0_OK, $response->getResultCode());
self::assertSame('OK', $response->getResultMessage());
self::assertSame(['VISA', 'MASTERCARD'], $response->getInitParams()?->getAllowedCardNetworks());
self::assertSame(Country::CZE, $response->getInitParams()?->getCountryCode());
self::assertSame(InitParamsEnvironment::TEST, $response->getInitParams()?->getEnvironment());
self::assertSame(0, $response->getInitParams()?->getApiVersionMinor());
self::assertSame(Country::CZE, $response->getInitParams()->getCountryCode());
self::assertSame(InitParamsEnvironment::TEST, $response->getInitParams()->getEnvironment());
self::assertSame(0, $response->getInitParams()->getApiVersionMinor());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function testSend(): void
self::assertSame(PaymentStatus::S1_CREATED, $paymentResponse->getPaymentStatus());
self::assertNull($paymentResponse->getStatusDetail());
self::assertSame('https://example.com/3ds-method-endpoint', $paymentResponse->getActions()?->getFingerprint()?->getBrowserInit()?->getUrl());
self::assertNull($paymentResponse->getActions()?->getAuthenticate());
self::assertNull($paymentResponse->getActions()->getAuthenticate());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public function testSend(): void
self::assertSame(PaymentStatus::S2_IN_PROGRESS, $response->getPaymentStatus());
self::assertNull($response->getActions()?->getFingerprint());
self::assertSame('eeddda80-6ca7-4b22-9d6a-eb8e84791ec9', $response->getActions()?->getAuthenticate()?->getSdkChallenge()?->getThreeDSServerTransID());
self::assertSame('3DS_LOA_ACS_201_13579', $response->getActions()?->getAuthenticate()?->getSdkChallenge()?->getAcsReferenceNumber());
self::assertSame('7f3296a8-08c4-4afb-a3e2-8ce31b2e9069', $response->getActions()?->getAuthenticate()?->getSdkChallenge()?->getAcsTransID());
self::assertSame('base64-encoded-acs-signed-content', $response->getActions()?->getAuthenticate()?->getSdkChallenge()?->getAcsSignedContent());
self::assertSame('3DS_LOA_ACS_201_13579', $response->getActions()->getAuthenticate()->getSdkChallenge()->getAcsReferenceNumber());
self::assertSame('7f3296a8-08c4-4afb-a3e2-8ce31b2e9069', $response->getActions()->getAuthenticate()->getSdkChallenge()->getAcsTransID());
self::assertSame('base64-encoded-acs-signed-content', $response->getActions()->getAuthenticate()->getSdkChallenge()->getAcsSignedContent());
}

}
4 changes: 2 additions & 2 deletions tests/unit/Call/PaymentStatusRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function testSend(): void
self::assertSame(PaymentStatus::S4_CONFIRMED, $response->getPaymentStatus());
self::assertSame('F7A23E', $response->getAuthCode());
self::assertSame('https://example.com/3ds-method-endpoint', $response->getActions()?->getFingerprint()?->getBrowserInit()?->getUrl());
self::assertSame('https://example.com/challenge-endpoint', $response->getActions()?->getAuthenticate()?->getBrowserChallenge()?->getUrl());
self::assertSame(HttpMethod::GET, $response->getActions()?->getAuthenticate()?->getBrowserChallenge()?->getMethod());
self::assertSame('https://example.com/challenge-endpoint', $response->getActions()->getAuthenticate()?->getBrowserChallenge()?->getUrl());
self::assertSame(HttpMethod::GET, $response->getActions()->getAuthenticate()->getBrowserChallenge()->getMethod());
}

}

0 comments on commit 89bac0b

Please sign in to comment.