'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.
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