Open ajmeese7 opened 2 months ago
Since the results aren't returned in the cloud code function it should return undefined similar to the JS SDK Cloud.js
There's no need to mock as you can create and call a real cloud code function. https://github.com/parse-community/parse-php-sdk/blob/master/tests/cloud-code.js
@ajmeese7 Can you check the CI? There seems to be a linting issue. I also left a few comments
Is this actually fixing a bug or just a refactor to not display a warning message?
@mtrezza the warning is due to accessing a key that doesn't exist, so I'd consider that a bug. There's no telling if future PHP versions will error out on that, so I figured it's easiest to just solve the problem instead of letting it fester.
And @dplewis I haven't had time to look at your review/comments, I've been busy with other projects, but I'll try to get to that soon.
New Pull Request Checklist
Issue Description
The
isset
method is used to ensure theresult
key is set before attempting to read it.Closes: #518
Approach
Added in mocking capabilities to the
ParseCloud
class so the code changes can be tested.TODOs before merging