This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed README.md example.

  • Loading branch information...
1 parent b78871c commit 321fefa1f2e3c248f0ecd0e3f1300aaa1faa6362 m.svec committed Mar 25, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 README.md
View
7 README.md 100755 → 100644
@@ -28,14 +28,17 @@ $startUrl = 'http://example.com';
// init Mink and register sessions
$mink = new Mink(array(
- 'goutte1' => new Session(new GoutteDriver(GoutteClient($startUrl))),
- 'goutte2' => new Session(new GoutteDriver(GoutteClient($startUrl))),
+ 'goutte1' => new Session(new GoutteDriver(new GoutteClient())),
+ 'goutte2' => new Session(new GoutteDriver(new GoutteClient())),
'custom' => new Session(new MyCustomDriver($startUrl))
));
// set the default session name
$mink->setDefaultSessionName('goutte2');
+// visit a page
+$mink->visit($startUrl);
+
// call to getSession() without argument will always return a default session if has one (goutte2 here)
$mink->getSession()->getPage()->findLink('Downloads')->click();
echo $mink->getSession()->getPage()->getContent();

0 comments on commit 321fefa

Please sign in to comment.