I have a laravel 5.x app and the unit testing was working all fine. Now the php unit has stopped sending headers with http request. One of my unit tests have the following code
$content='';
$content = $this->post('users/login', ['password' => 'mypass',
'email' => 'james.bond@gmail.com'])->response->getContent();
$data = json_decode($content);
$token = $data->token;
$content = $this->put('users/xsettings/0', ['HTTP_Authorization' => $token])->response->getContent();
I have checked the existence for Authorization
at the receiving end and found that it is not in the request.
I have tried calling $this->refreshApplication() and tried using $this->call() without luck.
Any help is appreciated.
Thanks in advance
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ip4Ach
via IFTTT
Aucun commentaire:
Enregistrer un commentaire