X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fbehat%2Fgherkin%2Ftests%2FBehat%2FGherkin%2FKeywords%2FKeywordsDumperTest.php;fp=vendor%2Fbehat%2Fgherkin%2Ftests%2FBehat%2FGherkin%2FKeywords%2FKeywordsDumperTest.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=cf7f853a4dc6cf8ea219d40d87dffee7b61e7386;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/behat/gherkin/tests/Behat/Gherkin/Keywords/KeywordsDumperTest.php b/vendor/behat/gherkin/tests/Behat/Gherkin/Keywords/KeywordsDumperTest.php deleted file mode 100644 index cf7f853a4..000000000 --- a/vendor/behat/gherkin/tests/Behat/Gherkin/Keywords/KeywordsDumperTest.php +++ /dev/null @@ -1,270 +0,0 @@ -keywords = new 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' - ), - 'ru' => array( - 'feature' => 'Функционал|Фича', - 'background' => 'Предыстория|Бэкграунд', - 'scenario' => 'Сценарий|История', - 'scenario_outline' => 'Структура сценария|Аутлайн', - 'examples' => 'Значения', - 'given' => 'Допустим', - 'when' => 'Если|@', - 'then' => 'То', - 'and' => 'И', - 'but' => 'Но' - ) - )); - } - - public function testEnKeywordsDumper() - { - $dumper = new KeywordsDumper($this->keywords); - - $dumped = $dumper->dump('en'); - $etalon = << - And there is agent - When I erase agent 's memory - Then there should be agent - But there should not be agent - - (Examples|Scenarios): - | agent1 | agent2 | - | D | M | -GHERKIN; - - $this->assertEquals($etalon, $dumped); - } - - public function testRuKeywordsDumper() - { - $dumper = new KeywordsDumper($this->keywords); - - $dumped = $dumper->dump('ru'); - $etalon = << - И there is agent - (Если|@) I erase agent 's memory - То there should be agent - Но there should not be agent - - Значения: - | agent1 | agent2 | - | D | M | -GHERKIN; - - $this->assertEquals($etalon, $dumped); - } - - public function testRuKeywordsCustomKeywordsDumper() - { - $dumper = new KeywordsDumper($this->keywords); - $dumper->setKeywordsDumperFunction(function ($keywords) { - return ''.implode(', ', $keywords).''; - }); - - $dumped = $dumper->dump('ru'); - $etalon = <<Функционал, Фича: Internal operations - In order to stay secret - As a secret organization - We need to be able to erase past agents' memory - - Предыстория, Бэкграунд: - Допустим there is agent A - И there is agent B - - Сценарий, История: Erasing agent memory - Допустим there is agent J - И there is agent K - Если, @ I erase agent K's memory - То there should be agent J - Но there should not be agent K - - Структура сценария, Аутлайн: Erasing other agents' memory - Допустим there is agent - И there is agent - Если, @ I erase agent 's memory - То there should be agent - Но there should not be agent - - Значения: - | agent1 | agent2 | - | D | M | -GHERKIN; - - $this->assertEquals($etalon, $dumped); - } - - public function testExtendedVersionDumper() - { - $dumper = new KeywordsDumper($this->keywords); - - $dumped = $dumper->dump('ru', false); - $etalon = array( - << - И there is agent - Если I erase agent 's memory - @ I erase agent 's memory - То there should be agent - Но there should not be agent - - Значения: - | agent1 | agent2 | - | D | M | - - Аутлайн: Erasing other agents' memory - Допустим there is agent - И there is agent - Если I erase agent 's memory - @ I erase agent 's memory - То there should be agent - Но there should not be agent - - Значения: - | agent1 | agent2 | - | D | M | -GHERKIN - , << - И there is agent - Если I erase agent 's memory - @ I erase agent 's memory - То there should be agent - Но there should not be agent - - Значения: - | agent1 | agent2 | - | D | M | - - Аутлайн: Erasing other agents' memory - Допустим there is agent - И there is agent - Если I erase agent 's memory - @ I erase agent 's memory - То there should be agent - Но there should not be agent - - Значения: - | agent1 | agent2 | - | D | M | -GHERKIN - ); - - $this->assertEquals($etalon, $dumped); - } -}