Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/behat/gherkin
Gherkin parser, written in PHP for Behat project
https://github.com/behat/gherkin
behat dsl gherkin gherkin-parser php
Last synced: 2 days ago
JSON representation
Gherkin parser, written in PHP for Behat project
- Host: GitHub
- URL: https://github.com/behat/gherkin
- Owner: Behat
- License: mit
- Created: 2011-01-05T00:38:11.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2024-12-24T17:10:14.000Z (about 1 month ago)
- Last Synced: 2025-01-26T00:51:43.595Z (12 days ago)
- Topics: behat, dsl, gherkin, gherkin-parser, php
- Language: PHP
- Homepage:
- Size: 979 KB
- Stars: 1,050
- Watchers: 18
- Forks: 94
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Behat Gherkin Parser
This is the php Gherkin parser for Behat. It comes bundled with more than 40 native languages (see `i18n.php`) support
and clean architecture.## Useful Links
- [Behat Site](https://behat.org)
- [Note on Patches/Pull Requests](CONTRIBUTING.md)## Usage Example
```php
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'));
```## Installing Dependencies
```shell
curl https://getcomposer.org/installer | php
php composer.phar update
```## Contributors
* Konstantin Kudryashov [everzet](http://github.com/everzet) [lead developer]
* Other [awesome developers](https://github.com/Behat/Gherkin/graphs/contributors)