Giter Club home page Giter Club logo

omnipay-tests's People

Contributors

amacneil avatar barryvdh avatar cfreear avatar dandroas avatar greydnls avatar mmacaulay avatar philsturgeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omnipay-tests's Issues

omnipay/buckaroo tests fail due to Mockery 0.9

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.

guzzlehttp/psr7 ^2

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.

Gateway tests assume any string is valid for a gateway parameter

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.

Failing test for default-parameter "currency"

This assertion in GatewayTestCase::testDefaultParametersHaveMatchingMethods() will fail for the parameter currency

$this->assertSame($value, $this->gateway->$getter());

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',
        ];
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.