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.
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 linePHP 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, therestapi
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.