behat/mink
Composer 安装命令:
composer require --dev behat/mink
包简介
Browser controller/emulator abstraction for PHP
README 文档
README
Useful Links
- The main website with documentation is at https://mink.behat.org
- Official Google Group is at https://groups.google.com/group/behat
- Note on Patches/Pull Requests
Usage Example
<?php use Behat\Mink\Mink, Behat\Mink\Session, Behat\Mink\Driver\GoutteDriver, 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 $mink->setDefaultSessionName('goutte2'); // visit a page $mink->getSession()->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(); // call to getSession() with argument will return session by its name $mink->getSession('custom')->getPage()->findLink('Downloads')->click(); echo $mink->getSession('custom')->getPage()->getContent(); // this all is done to make possible mixing sessions $mink->getSession('goutte1')->getPage()->findLink('Chat')->click(); $mink->getSession('goutte2')->getPage()->findLink('Chat')->click();
Install Dependencies
$> curl -sS https://getcomposer.org/installer | php $> php composer.phar install
Contributors
- Konstantin Kudryashov everzet [lead developer]
- Christophe Coevoet stof [lead developer]
- Alexander Obuhovich aik099 [lead developer]
- Other awesome developers
behat/mink 适用场景与选型建议
behat/mink 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 89.76M 次下载、GitHub Stars 达 1.61k, 最近一次更新时间为 2011 年 12 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「testing」 「browser」 「web」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 behat/mink 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 behat/mink 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 behat/mink 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Give your JS App some Backbone with Models, Views, Collections, and Events.
Testing Suite For Lumen like Laravel does.
Model of a web-based resource
Instrument headless chrome/chromium instances from php5.6
Selenium4 (WebDriver) driver for Mink framework
Retrieve a WebResourceInterface instance over HTTP
统计信息
- 总下载量: 89.76M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1629
- 点击次数: 22
- 依赖项目数: 687
- 推荐数: 5
其他信息
- 授权协议: MIT
- 更新时间: 2011-12-21