PHP-Auth
PHP-Auth copied to clipboard
PHPUnit fails due to headers already being sent
Testing our authentication wrapper class with PHPUnit from the command line fails with the following error:
ErrorException: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time
Any insight would be helpful. Thanks!
The library is not specifically designed to work on the CLI, but instead is made for the browser. However, for tests, you should be able to make it work very easily.
Before you create the instance, as described in the README, e.g. via new \Delight\Auth\Auth($db), is there any text output before that point? That should be (re)moved.