coreshop / mink-panther-driver
Symfony Panther driver for Mink framework
Installs: 4 668
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 8
Type:mink-driver
Requires
- php: >=7.1
- ext-dom: *
- behat/mink: ^1.7.1@dev
- symfony/panther: ~0.4
Requires (Dev)
- mink/driver-testsuite: dev-master
- phpunit/phpunit: ~6.0|~7.0
- symfony/dom-crawler: ~2.3|~3.0|~4.0
- symfony/http-kernel: ~2.3|~3.0|~4.0
Suggests
- ext-gd: *
This package is auto-updated.
Last update: 2024-10-20 13:40:41 UTC
README
Symfony Panther driver for Mink framework
Originally from
https://github.com/robertfausk/mink-panther-driver
Install
composer req --dev behat/mink robertfausk/mink-panther-driver
Usage Example
<?php use Behat\Mink\Mink, Behat\Mink\Session, Behat\Mink\Driver\PantherDriver; protected static $defaultOptions = [ 'webServerDir' => __DIR__.'/../../../../public', // the Flex directory structure 'hostname' => '127.0.0.1', 'port' => 9080, 'router' => '', 'external_base_uri' => null, ]; $mink = new Mink(array( 'panther' => new Session(new PantherDriver('panther', $defaultOptions, [])), )); $mink->getSession('panther')->getPage()->findLink('Chat')->click();
Please refer to MinkExtension-example for an executable example.
Documentation
Since MinkPantherDriver is just glue between Mink and Symfony Panther, it already has an extensive documentation:
- For
Mink
, read Mink's documentation - For
symfony/panther
, read Panther's documentation - For usage with
Behat
, read Behat's documentation
How to contribute
Start docker-compose with php web driver
docker-compose up php7.2
Run phpunit tests
docker-compose exec php7.2 vendor/bin/phpunit
Credits
Created by Robert Freigang robertfausk.
MinkPantherDriver is built on top of Panther and for usage with Behat and Mink. It has been inspired by MinkBrowserKitDriver and MinkSelenium2Driver.