Skip to content

Gateway tests assume any string is valid for a gateway parameter #10

@judgej

Description

@judgej

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions