廖泽华 a37f2bbff5 init code 4 gadi atpakaļ
..
bin a37f2bbff5 init code 4 gadi atpakaļ
src a37f2bbff5 init code 4 gadi atpakaļ
tests a37f2bbff5 init code 4 gadi atpakaļ
.gitignore a37f2bbff5 init code 4 gadi atpakaļ
.travis.yml a37f2bbff5 init code 4 gadi atpakaļ
CHANGES.md a37f2bbff5 init code 4 gadi atpakaļ
CONTRIBUTING.md a37f2bbff5 init code 4 gadi atpakaļ
LICENSE a37f2bbff5 init code 4 gadi atpakaļ
README.md a37f2bbff5 init code 4 gadi atpakaļ
composer.json a37f2bbff5 init code 4 gadi atpakaļ
i18n.php a37f2bbff5 init code 4 gadi atpakaļ
libpath.php a37f2bbff5 init code 4 gadi atpakaļ
package.xml.tpl a37f2bbff5 init code 4 gadi atpakaļ
phpdoc.ini.dist a37f2bbff5 init code 4 gadi atpakaļ
phpunit.xml.dist a37f2bbff5 init code 4 gadi atpakaļ

README.md

Behat Gherkin Parser

This is the php Gherkin parser for Behat. It comes bundled with more than 40 native languages (see i18n.php) support & clean architecture.

Build Status Scrutinizer Code Quality Code Coverage

Useful Links

Usage Example

<?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'));

Installing Dependencies

$> curl http://getcomposer.org/installer | php
$> php composer.phar update

Contributors