From fe29e58eec4249f4e60e59e41c05bf0c83486b22 Mon Sep 17 00:00:00 2001 From: everzet Date: Sat, 14 Jan 2012 15:49:37 +0100 Subject: [PATCH] updated README --- README.md | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index efbe1673..b5f889da 100644 --- a/README.md +++ b/README.md @@ -15,26 +15,34 @@ Usage $keywords = new Behat\Gherkin\Keywords\ArrayKeywords(array( 'en' => array( - 'Feature' => 'Feature', - 'Background' => 'Background', - 'Scenario' => 'Scenario', - 'Scenario Outline' => 'Scenario Outline', - 'Examples' => 'Examples', - 'Step Types' => 'Given|When|Then|And|But' + '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', - 'Step Types' => 'Let go and haul|Gangway!|Blimey!|Avast!|Aye' + '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); -$arrayOfFeatures = $parser->parse('/path/to/file.feature OR feature itself'); +$arrayOfFeatures = $parser->parse(file_get_contents('some.feature')); ```