auth0 / auth0-PHP

PHP SDK for Auth0 Authentication and Management APIs.
https://auth0.com/docs/libraries/auth0-php
MIT License
380 stars 209 forks source link

Update callback verification in HttpRequest. #769

Closed midnite81 closed 1 month ago

midnite81 commented 1 month ago

Changes

'callback' is a property not a method of $mockedResponse

Changed the method_exists check to a property_exists check in the HttpRequest class. This adjustment ensures that 'callback' is an accessible property of the object before attempting to invoke it. This change improves code reliability, specifically for the cases where HttpRequest is used in unit tests with mock responses.

References

#768 Callback Never Called

Testing

A test has been added to assert the fix is working as expected

Contributor Checklist