richard.herbert
04/14/2023, 11:38 AMcfhttp
call so I can test the subsequent processing of the data returned.
I've mocked the component with createMock()
and mocked the result with $property()
but when I run my test the API is called, which of course fails, because I'm not giving it all the info it needs to run.
Is this type of thing impossible to test unless I wrap the API call in its own method, so I can mock that out completely? I'm cool with that if it's the only solution, I just wanted to have some tests in place before I did any refactoring.
Opinions welcomed.