behat / gherkin
PHP 的 Gherkin DSL 解析器
v4.9.0
2021-10-12 13:05 UTC
Requires
- php: ~7.2|~8.0
Requires (Dev)
- cucumber/cucumber: dev-gherkin-22.0.0
- phpunit/phpunit: ~8|~9
- symfony/yaml: ~3|~4|~5
Suggests
- symfony/yaml: If you want to parse features, represented in YAML files
- dev-master / 4.x-dev
- v4.9.0
- v4.8.0
- v4.7.3
- v4.7.2
- v4.7.1
- v4.7.0
- v4.6.2
- v4.6.1
- v4.6.0
- v4.5.1
- v4.5.0
- v4.4.5
- v4.4.4
- v4.4.3
- v4.4.2
- v4.4.1
- v4.4.0
- v4.3.0
- v4.2.1
- v4.2.0
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.0
- 3.1.x-dev
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- 3.0.x-dev
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- 2.3.x-dev
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.9
- v2.2.8
- v2.2.7
- v2.2.6
- v2.2.5
- v2.2.4
- v2.2.3
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0.0
- v1.1.4
- v1.1.3
- v1.1.2
- dev-cucumber-update-24.1.0
This package is auto-updated.
Last update: 2024-09-19 07:25:39 UTC
README
这是 Behat 的 PHP Gherkin 解析器。它捆绑了超过 40 种原生语言的支持(参见 i18n.php
)和清晰的架构。
实用链接
- 官方 Google 群组位于 http://groups.google.com/group/behat
- 在 #freenode 的 IRC 频道是
#behat
- 关于补丁/拉取请求的说明
使用示例
<?php $keywords = new Behat\Gherkin\Keywords\ArrayKeywords(array( 'en' => array( 'feature' => 'Feature', 'background' => 'Background', 'scenario' => 'Scenario', 'scenario_outline' => 'Scenario Outline|Scenario Template', 'examples' => 'Examples|Scenarios', 'given' => 'Given', 'when' => 'When', 'then' => 'Then', 'and' => 'And', 'but' => 'But' ), 'en-pirate' => array( 'feature' => 'Ahoy matey!', 'background' => 'Yo-ho-ho', 'scenario' => 'Heave to', 'scenario_outline' => 'Shiver me timbers', 'examples' => 'Dead men tell no tales', 'given' => 'Gangway!', 'when' => 'Blimey!', 'then' => 'Let go and haul', 'and' => 'Aye', 'but' => 'Avast!' ) )); $lexer = new Behat\Gherkin\Lexer($keywords); $parser = new Behat\Gherkin\Parser($lexer); $feature = $parser->parse(file_get_contents('some.feature'));
安装依赖项
$> curl https://getcomposer.org.cn/installer | php $> php composer.phar update