FeatureContext.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. use Behat\Behat\Context\ClosuredContextInterface,
  3. Behat\Behat\Context\TranslatedContextInterface,
  4. Behat\Behat\Context\BehatContext,
  5. Behat\Behat\Exception\PendingException;
  6. use Behat\Gherkin\Node\PyStringNode,
  7. Behat\Gherkin\Node\TableNode;
  8. use Behat\MinkExtension\Context\MinkContext;
  9. //
  10. // Require 3rd-party libraries here:
  11. //
  12. // require_once 'PHPUnit/Autoload.php';
  13. // require_once 'PHPUnit/Framework/Assert/Functions.php';
  14. //
  15. /**
  16. * Features context.
  17. */
  18. class FeatureContext extends MinkContext
  19. {
  20. /**
  21. * Initializes context.
  22. * Every scenario gets its own context object.
  23. *
  24. * @param array $parameters context parameters (set them up through behat.yml)
  25. */
  26. public function __construct(array $parameters)
  27. {
  28. // Initialize your context here
  29. }
  30. /**
  31. * @Given /^I click on "([^"]*)"$/
  32. */
  33. public function iClickOn($arg1)
  34. {
  35. # $findName = $this->getSession()->getPage()->find("css", $arg1);
  36. # if (!$findName) {
  37. # throw new Exception($arg1 . " could not be found");
  38. # } else {
  39. # $findName->click();
  40. # }
  41. }
  42. /**
  43. * @Then /^I wait for the suggestion box to appears$/
  44. */
  45. public function iWaitForTheSuggestionBoxToAppears()
  46. {
  47. $this->getSession()->wait(5000);
  48. }
  49. //
  50. // Place your definition and hook methods here:
  51. //
  52. // /**
  53. // * @Given /^I have done something with "([^"]*)"$/
  54. // */
  55. // public function iHaveDoneSomethingWith($argument)
  56. // {
  57. // doSomethingWith($argument);
  58. // }
  59. //
  60. }