3 namespace Tests\Behat\Gherkin\Keywords;
5 use Behat\Gherkin\Keywords\CucumberKeywords;
6 use Behat\Gherkin\Node\StepNode;
7 use Symfony\Component\Yaml\Yaml;
9 class CucumberKeywordsTest extends KeywordsTest
11 protected function getKeywords()
13 return new CucumberKeywords(__DIR__ . '/../Fixtures/i18n.yml');
16 protected function getKeywordsArray()
18 return Yaml::parse(file_get_contents(__DIR__ . '/../Fixtures/i18n.yml'));
21 protected function getSteps($keywords, $text, &$line, $keywordType)
24 foreach (explode('|', mb_substr($keywords, 2)) as $keyword) {
25 if (false !== mb_strpos($keyword, '<')) {
26 $keyword = mb_substr($keyword, 0, -1);
29 $steps[] = new StepNode($keyword, $text, array(), $line++, $keywordType);