soyuka/contexts
最新稳定版本:v3.3.13
Composer 安装命令:
composer require soyuka/contexts
包简介
Behatch contexts
关键字:
README 文档
README
Behatch contexts provide most common Behat tests.
Installation
This extension requires:
- Behat 3+
- Mink
- Mink extension
Project dependency
- Install Composer
- Require the package with Composer:
$ composer require --dev soyuka/contexts
- Activate extension by specifying its class in your
behat.yml:
# behat.yml default: # ... extensions: Behatch\Extension: ~
Project bootstraping
- Download the Behatch skeleton with composer:
$ php composer.phar create-project behatch/skeleton
Browser, json, table and rest step need a mink configuration, see Mink extension for more information.
Usage
In behat.yml, enable desired contexts:
default: suites: default: contexts: - behatch:context:browser - behatch:context:debug - behatch:context:system - behatch:context:json - behatch:context:table - behatch:context:rest - behatch:context:xml
Examples
This project is self-tested, you can explore the features directory to find some examples.
Configuration
browser- more browser related steps (like mink)timeout- default timeout
debug- helper steps for debuggingscreenshotDir- the directory where store screenshots
system- shell related stepsroot- the root directory of the filesystem
json- JSON related stepsevaluationMode- javascript "foo.bar" or php "foo->bar"
table- play with HTML the tablesrest- send GET, POST, ... requests and test the HTTP headersxml- XML related steps
Configuration Example
For example, if you want to change default directory to screenshots - you can do it this way:
default: suites: default: contexts: - behatch:context:debug: screenshotDir: "var"
统计信息
- 总下载量: 1.82M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 29
- 点击次数: 3
- 依赖项目数: 11
- 推荐数: 0
其他信息
- 授权协议: beerware
- 更新时间: 2026-01-04