Skip to content

Failing test for default-parameter "currency" Β #12

@prilka

Description

@prilka

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

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