Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fixed README.md example.
Browse files Browse the repository at this point in the history
  • Loading branch information
m.svec committed Mar 25, 2013
1 parent b78871c commit 321fefa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md 100755 → 100644
Expand Up @@ -28,14 +28,17 @@ $startUrl = 'http://example.com';


// init Mink and register sessions // init Mink and register sessions
$mink = new Mink(array( $mink = new Mink(array(
'goutte1' => new Session(new GoutteDriver(GoutteClient($startUrl))), 'goutte1' => new Session(new GoutteDriver(new GoutteClient())),
'goutte2' => new Session(new GoutteDriver(GoutteClient($startUrl))), 'goutte2' => new Session(new GoutteDriver(new GoutteClient())),
'custom' => new Session(new MyCustomDriver($startUrl)) 'custom' => new Session(new MyCustomDriver($startUrl))
)); ));


// set the default session name // set the default session name
$mink->setDefaultSessionName('goutte2'); $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) // call to getSession() without argument will always return a default session if has one (goutte2 here)
$mink->getSession()->getPage()->findLink('Downloads')->click(); $mink->getSession()->getPage()->findLink('Downloads')->click();
echo $mink->getSession()->getPage()->getContent(); echo $mink->getSession()->getPage()->getContent();
Expand Down

0 comments on commit 321fefa

Please sign in to comment.