Adapter::get, post, put, patch and delete all had non-optional parameters for $headers and $query or $body. These have been made optional. I also re-ordered the parameters as $headers was never used while $query/$body were heavily used. I also condensed and removed some duplicate calls so that every call to Adapter::get/post sends that call to Adapter::request. It could use a magic method to do this but it might make it more difficult to test.
* Added toggleDevelopmentMode to Zones
* Improved success checking
Added PHPUnit test (I think?)
* Fixed success checking
* Fixed test
* Ran PHP CS Fixer
* Added getAnalyticsDashboard to Zones
Renamed toggleDevelopmentMode to changeDevelopmentMode to be uniform
* Fixed test (hopefully)
* Trying it a different way
* Another attempt
* Lol I guess we are just supressing errors for this one?
This PR moves the JSON API responses used in the tests to fixture files
within the tests folder. This allows reuse and the ability to lint/validate
these fixtures if required - although not covered in this PR.
I've added TestCase::getPsr7StreamForFixture and TestCase::getPsr7JsonResponseForFixture
to reduce code duplication and enable some assertions around the expected fixures/responses.
Thanks,