php - Symfony2 PHPUnit functional test has x-debug-token header instead of X-Debug-Token -
i'm working on symfony 2.8.2 application.
now, want check through profiler if email sent successfully. enabled profiler in config_test.yml
that
framework: test: ~ session: storage_id: session.storage.mock_file profiler: enabled: true collect: false
so, enable profiler in client , request in phpunit functional test:
$client->enableprofiler(); $client->request($method, $path, $requestparameters, array(), $headers); $mailcollector = $client->getprofile()->getcollector('swiftmailer');
but $client->getprofile()
returns false.
i found problem in symfony profiler when @ line 84 tries token
if (!$token = $response->headers->get('x-debug-token')) { return false; } return $this->loadprofile($token);
i debugged response , found has 4 headers , 1 of them named 'x-debug-token'.
why header have name? how can modify header profiler?
thanks!
Comments
Post a Comment