Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing requests #13

Open
GonzaloGPF opened this issue Mar 31, 2021 · 1 comment
Open

Testing requests #13

GonzaloGPF opened this issue Mar 31, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@GonzaloGPF
Copy link

Hi,
Thanks for this package, its working fine and helped me upgrading old soap-wrapper package.
However, I'm having problems writting tests, I'm not sure how mock requests or fake SoapClient to avoid issuing real requests.
Is it possible?
Thanks!

@iBotPeaches iBotPeaches added the enhancement New feature or request label Mar 31, 2021
@iBotPeaches
Copy link
Member

It is, but nothing quite easily out of the box of the package. So that is something we can mark for some enhancements to introduce some helpful tricks. The benefit of Soapy (if using class based mapping) is the output of Soapy is a regular ole class. So you could mock the calling code that emits the Soap call and just return the mapped class.

Since Soapy at end of day just extends the base /SoapClient - it would take some enhancements to the package (Possibly introducing our own fake soap client to easily test) to allow the Laravel style of just like calling fake() and passing some parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants