Created
September 8, 2016 15:41
-
-
Save 228vit/3042f195d30083a0f44dca5cad1907e8 to your computer and use it in GitHub Desktop.
Symfony: Unit test with cookie
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$client = static::createClient(); | |
$cookie = new Cookie('name', 'value', time() + 3600 * 24 * 7, '/', null, false, false); | |
$client->getCookieJar()->set($cookie); | |
$crawler = $client->request('GET', '/', []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment