You are here

private function FeatureContext::generateRandomTaxonomyString in Pantheon Advanced Page Cache 7

Generates a long string of tags used on node add form.

1 call to FeatureContext::generateRandomTaxonomyString()
FeatureContext::WhenIGenerateAnArticleWithLotsOfTerms in tests/behat/features/bootstrap/FeatureContext.php
@When a generate a :type node

File

tests/behat/features/bootstrap/FeatureContext.php, line 64

Class

FeatureContext
Define application features from the specific context.

Code

private function generateRandomTaxonomyString() {
  $all_letters = explode(' ', 'a b c d e f g h i j k l m n o p q r s t u v w x y z');
  $i = 0;
  $random_three_letter_combos = array();
  while ($i < 250) {
    $random_three_letter_combos[] = $all_letters[rand(0, 25)] . $all_letters[rand(0, 25)] . $all_letters[rand(0, 25)];
    $i++;
  }
  return implode(",", $random_three_letter_combos);
}