Description
I'm currently setting up some functional tests with symfony 3.1.5 and keep on running into an issue when trying to evaluate if an email has been submitted successfully.
I've enabled the profiler in my config_test.yml like this:
framework:
profiler:
enabled: true
collect: false
Within my test I request the Swiftmailer via the Profiler like this:
$this->client->enableProfiler();
// Note: The following function is my abstraction of the submission of the recover email form
$this->requestRecoveryMail($email);
$mailCollector = $this->client->getProfile()->getCollector('swiftmailer');
But I keep on getting the Error: Call to a member function getCollector() on boolean
error. I think that I've located the problem and found out that $this->client->getProfile()
always returns false.
As far as I know this comes from line 85 in the Symfony Profiler where the value of the X-Debug-Token
is always null
.
I'm really not sure if this is an actual bug, or just my stupidity but during my research on this topic i found this Post on a very similar issue on stackoverflow. But in my case I wasn't even able to find the X-Debug-token header within the request.
(Note: The actual code of this test can be found here in this repository.)