I can't seem to find a way to do TDD/BDD with external APIs in PHP, none-the-less Laravel. It would be great is there was a PHP package similar to WireMock (ref: http://wiremock.org/ ). Most alternative seem to be out of date (dependencies or the lib itself).
Ideally, I'd love to see a video on how to do this easily and properly.
I use AspectMock (https://github.com/Codeception/AspectMock) to mock out the API wrappers in my projects, so I can test all the possible error conditions from an external API as well as what happens when things are going well. For example...
I can then perform a normal functional test in Laravel, and when it gets to calling Stripe, it will instead return that array and I can test that the users account has been updated to the correct state.
I'm getting ' Call to a member function registerClass() on a non-object '. I'm obviously phrasing the reference to httpful's request class wrong, but I'm also unsure whether what I'm trying to do is even possible.