Dmitriy Gnatenko 40085f0615 Codeception added | 3 gadi atpakaļ | |
---|---|---|
.. | ||
.github | 3 gadi atpakaļ | |
bin | 3 gadi atpakaļ | |
src | 3 gadi atpakaļ | |
CHANGES.md | 3 gadi atpakaļ | |
CONTRIBUTING.md | 3 gadi atpakaļ | |
LICENSE | 3 gadi atpakaļ | |
README.md | 3 gadi atpakaļ | |
composer.json | 3 gadi atpakaļ | |
i18n.php | 3 gadi atpakaļ | |
libpath.php | 3 gadi atpakaļ |
This is the php Gherkin parser for Behat. It comes bundled with more than 40 native languages
(see i18n.php
) support & clean architecture.
#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 http://getcomposer.org/installer | php
$> php composer.phar update