phpList / phplist-plugin-restapi

REST API as a plugin for phpList/phpList3
http://resources.phplist.com/plugin/restapi
GNU Affero General Public License v3.0
21 stars 31 forks source link

Fixes for problems with running restapi tests #72

Closed bramley closed 1 year ago

bramley commented 1 year ago

Three small changes for problems I found when trying to run the tests provided by the restapi_test class.

1) Rename the constructor of the restapi_test class to avoid php deprecation warning when running php from the command line

PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; restapi_test has a deprecated constructor in /home/duncan/Development/GitHub/phplist-plugin-restapi/plugins/restapi_test.php on line 7

2) Fix a problem with the restapi class. When running the tests, the restapi class doesn't return an error message correctly in some cases.

3) Simplify the derivation of the URL to call when running tests and include the secret parameter if that is required.

michield commented 1 year ago

Didn't try, but I take your word for it :-)