opened
alexislefebvre
username_0
One of our projects rely on MangopayBundle. Tests written with Behat fail sometimes because the test environment call the API in order to get a wallet. The amount (`Balance`) in this wallet is not fixed so it breaks tests that rely on this amount.

I think that it would be nice if we could configure MangopayBundle to bypass the API calls and return some given values instead. For example by specifying a given wallet id when we load the fixtures for one user.

For example, let's say we define a wallet with id `1`, then the MangopayBundle may detect that this value correspond to the `test` environment and return the values (e.g. the amount) from our fixtures instead of calling the API.

Do you think it's doable and interesting?
During tests, bypass API calls and return data from fixtures instead?
issue
created
alexislefebvre
username_0
Another solution would be to alter the `troopers_mangopay.wallet_helper` service in the `test` environment so that it returns expected data instead of calling the *real* API.
comment
closed
alexislefebvre
username_0
issue
created
alexislefebvre
username_0
@gregumo found a solution: he created wallets with the API sandbox and was able to increment or decrement amounts in the wallet.
comment