/**
  * Creates the specified element. More info about available elements in http://docs.moodle.org/dev/Acceptance_testing#Fixtures.
  *
  * @Given /^the following "(?P<element_string>(?:[^"]|\\")*)" instances exist:$/
  *
  * This step overrides behat generator step and accepts following parameters to call generator steps for multiple instances.
  * - instances : Number of instances to create
  *   * It replaces #!count!# with the incremental value.
  * - refencecont: This is used in case you want a counter to be modulo of some value.
  *   * It replaces #!count#! with incremental value.
  *   * #!refcount!# will
  * - repeat: This will repeat the table row  x times.
  *   * Replaces #!repeatcount!3 with the repeating value.
  *
  * @throws Exception
  * @throws PendingException
  * @param string    $elementname The name of the entity to add
  * @param TableNode $data
  */
 public function the_following_instances_exist($elementname, TableNode $data)
 {
     $datageneratorcontext = behat_context_helper::get('behat_data_generators');
     $datanodes = $this->fix_data_counter($data);
     foreach ($datanodes as $datanode) {
         generator::dot();
         $datageneratorcontext->the_following_exist($elementname, $datanode);
     }
 }
 /**
  * After suite event.
  *
  * @param SuiteEvent $event
  * @AfterStep
  */
 public static function after_step(StepEvent $event)
 {
     generator::dot();
 }