You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1) Omnipay\Tests\Foo\GatewayTest::testDefaultParametersHaveMatchingMethods
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'5b73ed8edf6e5'
+'5B73ED8EDF6E5'
To reproduce this, simply create a gateway with the key currency in his getDefaultParameters()-Result.
public function getDefaultParameters()
{
return [
'currency' => 'EUR',
];
}
The text was updated successfully, but these errors were encountered:
I encountered this too, with my own default parameters that used a getter that manipulates what it returns. The currency happens to be a built-in example, but it's not the only one. The short-term solution will be to remove the currency from the list of default values, which I realise is not ideal.
Ah, here we go, mentioned along with a related issue with default parameters (they bypass the validate() checks:
I implemented a similar solution only in my tests. But it's a pain to override all the buggy core-tests.
In my opinion, the tests make no sense inside the base class.
This assertion in GatewayTestCase::testDefaultParametersHaveMatchingMethods() will fail for the parameter
currency
omnipay-tests/src/GatewayTestCase.php
Line 51 in 599d418
The reason is the
strtoupper()
in AbstractGateway::getCurrency()The message will look like this
To reproduce this, simply create a gateway with the key
currency
in hisgetDefaultParameters()
-Result.The text was updated successfully, but these errors were encountered: