From d12616a875637b14f4010ca165818edc41089bfb Mon Sep 17 00:00:00 2001 From: Liviu Balan Date: Sat, 27 Jan 2018 11:19:31 +0200 Subject: [PATCH] Fix passing arguments to "Client" constructor "Client" is expecting an instance of "CookieJar", not "Cookie" --- components/browser_kit.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/browser_kit.rst b/components/browser_kit.rst index c90f40a8368..6352611c59a 100644 --- a/components/browser_kit.rst +++ b/components/browser_kit.rst @@ -191,7 +191,9 @@ into the client constructor:: use Acme\Client; // create cookies and add to cookie jar - $cookieJar = new Cookie('flavor', 'chocolate', strtotime('+1 day')); + $cookie = new Cookie('flavor', 'chocolate', strtotime('+1 day')); + $cookieJar = new CookieJar(); + $cookieJar->set($cookie); // create a client and set the cookies $client = new Client(array(), null, $cookieJar);