Security update for permissions_by_term
[yaffs-website] / vendor / behat / gherkin / tests / Behat / Gherkin / Keywords / CucumberKeywordsTest.php
1 <?php
2
3 namespace Tests\Behat\Gherkin\Keywords;
4
5 use Behat\Gherkin\Keywords\CucumberKeywords;
6 use Behat\Gherkin\Node\StepNode;
7 use Symfony\Component\Yaml\Yaml;
8
9 class CucumberKeywordsTest extends KeywordsTest
10 {
11     protected function getKeywords()
12     {
13         return new CucumberKeywords(__DIR__ . '/../Fixtures/i18n.yml');
14     }
15
16     protected function getKeywordsArray()
17     {
18         return Yaml::parse(file_get_contents(__DIR__ . '/../Fixtures/i18n.yml'));
19     }
20
21     protected function getSteps($keywords, $text, &$line, $keywordType)
22     {
23         $steps = array();
24         foreach (explode('|', mb_substr($keywords, 2)) as $keyword) {
25             if (false !== mb_strpos($keyword, '<')) {
26                 $keyword = mb_substr($keyword, 0, -1);
27             }
28
29             $steps[] = new StepNode($keyword, $text, array(), $line++, $keywordType);
30         }
31
32         return $steps;
33     }
34 }