Latest Stable Version Latest Unstable Version Total Downloads Scrutinizer Code Quality Code Coverage Build Status SensioLabsInsight License

Usage Example


use Behat\Mink\Mink,
    Behat\Mink\Driver\Goutte\Client as GoutteClient;

$startUrl = 'http://example.com';

// init Mink and register sessions
$mink = new Mink(array(
    '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

// visit a page

// call to getSession() without argument will always return a default session if has one (goutte2 here)
echo $mink->getSession()->getPage()->getContent();

// call to getSession() with argument will return session by its name
echo $mink->getSession('custom')->getPage()->getContent();

// this all is done to make possible mixing sessions

Install Dependencies

$> curl -sS https://getcomposer.org/installer | php
$> php composer.phar install



PHP 5.3+ web browser emulator abstraction

Mink Info

⭐ Stars 1444
🔗 Homepage mink.behat.org
🔗 Source Code github.com
🕒 Last Update a year ago
🕒 Created 11 years ago
🐞 Open Issues 68
➗ Star-Issue Ratio 21
😎 Author minkphp