symfony "Cannot set session ID after the session has started" while testing

322 Views Asked by At

I'm using symfony 2.8.3 together with fosuserbundle, liipfunctionalTestBundle and HWIOAuthBundle. My test code

$client = static::makeClient(true);
// request of any other url is getting the same error
$crawler = $client->request('GET', '/login');
$this->assertStatusCode(302, $client);
$client->followRedirect();
$this->assertStatusCode(200, $client);

This code is always getting the error 'Cannot set session ID after the session has started'. But if I disable HWIOAuthBundle - the test works fine. Any ideas?

0

There are 0 best solutions below