Back

Cannot send session cookie - headers already sent PHPUnit


fenos posted 4 years ago

Hi guys, I have this strange problem when i call the parent::setUp() on my TestCase class for unit test a class

when i run phpunit it throw me this error:

1) MatchRequestRepositoryTest::test_find_requests_by_match_id
ErrorException: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/project.dev/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:459)

What can be the problem? Thanks for any help.


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us