symfony functional test clear session and cookies
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class YourTest extends WebTestCase
{
public function testSomething()
{
$client = static::createClient();
$client->request('GET', '/your/route');
// Clear the session and cookies
$client->getContainer()->get('session')->clear();
$client->getCookieJar()->clear();
// Add your assertions here
$this->assertResponseIsSuccessful();
}
}