Skip to content

Commit dc438d2

Browse files
liviubalanjaviereguiluz
authored andcommitted
Fix passing arguments to "Client" constructor
"Client" is expecting an instance of "CookieJar", not "Cookie"
1 parent 9661886 commit dc438d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/browser_kit.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ into the client constructor::
190190
use Acme\Client;
191191

192192
// create cookies and add to cookie jar
193-
$cookieJar = new Cookie('flavor', 'chocolate', strtotime('+1 day'));
193+
$cookie = new Cookie('flavor', 'chocolate', strtotime('+1 day'));
194+
$cookieJar = new CookieJar();
195+
$cookieJar->set($cookie);
194196

195197
// create a client and set the cookies
196198
$client = new Client(array(), null, $cookieJar);

0 commit comments

Comments
 (0)