Summary
We are writing unit tests to test the creation and invalidation of JWT tokens and receiving a \"The token could not be parsed from the reque
We faced a similar issue when writing tests on Laravel 4.2, exceptionally we added this lines when running the application on the testing environment:
// This will only work when unit testing
if ((\App::environment() == 'testing') && array_key_exists("HTTP_Authorization", LRequest::server())) {
$headers['Authorization'] = LRequest::server()["HTTP_Authorization"];
}