behat / mink-browserkit-driver
Mink框架的Symfony2 BrowserKit驱动程序
v2.2.0
2023-12-09 11:30 UTC
Requires
- php: >=7.2
- ext-dom: *
- behat/mink: ^1.11.0@dev
- symfony/browser-kit: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/dom-crawler: ^4.4 || ^5.0 || ^6.0 || ^7.0
Requires (Dev)
- mink/driver-testsuite: dev-master
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^8.5 || ^9.5
- symfony/error-handler: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/http-client: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/http-kernel: ^4.4 || ^5.0 || ^6.0 || ^7.0
- symfony/mime: ^4.4 || ^5.0 || ^6.0 || ^7.0
- yoast/phpunit-polyfills: ^1.0
README
使用示例
<?php use Behat\Mink\Mink, Behat\Mink\Session, Behat\Mink\Driver\BrowserKitDriver; use Symfony\Component\HttpKernel\Client; $app = require_once(__DIR__.'/app.php'); // Silex app $mink = new Mink(array( 'silex' => new Session(new BrowserKitDriver(new Client($app))), )); $mink->getSession('silex')->getPage()->findLink('Chat')->click();
安装
使用 composer require
命令安装
composer require --dev behat/mink behat/mink-browserkit-driver