thephpleague / omnipay-tests Goto Github PK
View Code? Open in Web Editor NEWTest components for the Omnipay PHP payment processing library
License: MIT License
Test components for the Omnipay PHP payment processing library
License: MIT License
Hello! Would it be possible to bump the version restrictions up to ~4 for PHPUnit and ~2 for squizlabs/php_codesniffer?
I've tried running the tests for omnipay/buckaroo
to develop a fix for an issue, but they fail. I downgraded to Mockery 0.8 and now they run fine. I suggest requiring ~0.8.0
instead of ~0.8
.
You require guzzlehttp/psr7 ^1
but current version is 2.4.1.
Please consider upgrading or allow both versions:
$ composer require omnipay/tests --dev
...
Problem 1
- Root composer.json requires omnipay/tests ^4.1 -> satisfiable by omnipay/tests[v4.1.0, v4.1.1, 4.1.x-dev].
- omnipay/tests[v4.1.0, ..., 4.1.x-dev] require guzzlehttp/psr7 ^1 -> found guzzlehttp/psr7[1.0.0, ..., 1.x-dev] but the package is fixed to 2.4.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Thanks for all the good work!
If you like I could make a PR.
The tests are in here, and send uniqu()
into every gateway default parameter to see what comes back. This fails when the gateway is not accepting a string, and either casts it to another value or throws an exception.
https://github.com/thephpleague/omnipay-tests/blob/master/src/Omnipay/Tests/GatewayTestCase.php
Gateway classes define a set of defaults, and those defaults can tell the test what would be acceptable. Defaults are commonly 0
(integer), ''
(string) and ['foo','bar']
(array). This can be used to set up the test to generate a random number, a random string, or pick a random element from the array.
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
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',
];
}
we want to upgrade our projet to php 8.2 and phpunit 10.x versiyon. But this package doesnot allow to use phpunit 10.
can we add phpunit support ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.