GherkinCest.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * @group gherkin
  4. */
  5. class GherkinCest
  6. {
  7. public function _before(CliGuy $I)
  8. {
  9. $I->amInPath('tests/data/sandbox');
  10. }
  11. public function steps(CliGuy $I)
  12. {
  13. $I->executeCommand('gherkin:steps scenario');
  14. $I->seeInShellOutput('I have terminal opened');
  15. $I->seeInShellOutput('ScenarioGuy::terminal');
  16. $I->seeInShellOutput('there is a file :name');
  17. $I->seeInShellOutput('I see file :name');
  18. $I->seeInShellOutput('ScenarioGuy::matchFile');
  19. }
  20. public function snippets(CliGuy $I)
  21. {
  22. $I->executeCommand('gherkin:snippets scenario');
  23. $I->seeInShellOutput('@Given I have only idea of what\'s going on here');
  24. $I->seeInShellOutput('public function iHaveOnlyIdeaOfWhatsGoingOnHere');
  25. }
  26. public function snippetsScenarioFile(CliGuy $I)
  27. {
  28. $I->executeCommand('gherkin:snippets scenario FileExamples.feature');
  29. $I->dontSeeInShellOutput('@Given I have only idea of what\'s going on here');
  30. $I->dontSeeInShellOutput('public function iHaveOnlyIdeaOfWhatsGoingOnHere');
  31. }
  32. public function snippetsScenarioFolder(CliGuy $I)
  33. {
  34. $I->executeCommand('gherkin:snippets scenario subfolder');
  35. $I->seeInShellOutput('Given I have a feature in a subfolder');
  36. $I->seeInShellOutput('public function iHaveAFeatureInASubfolder');
  37. $I->dontSeeInShellOutput('@Given I have only idea of what\'s going on here');
  38. $I->dontSeeInShellOutput('public function iHaveOnlyIdeaOfWhatsGoingOnHere');
  39. }
  40. }