function PollTestBase::_generateChoices

7 calls to PollTestBase::_generateChoices()
PollBlockTest::testRecentBlock in drupal/core/modules/poll/lib/Drupal/poll/Tests/PollBlockTest.php
Tests creating, viewing, voting on recent poll block.
PollCreateTest::testPollClose in drupal/core/modules/poll/lib/Drupal/poll/Tests/PollCreateTest.php
Tests creating, editing, and closing a poll.
PollCreateTest::testPollCreate in drupal/core/modules/poll/lib/Drupal/poll/Tests/PollCreateTest.php
Tests creating, listing, editing a new poll.
PollExpirationTest::testAutoExpire in drupal/core/modules/poll/lib/Drupal/poll/Tests/PollExpirationTest.php
Tests the expiration of a poll.
PollTokenReplaceTest::testPollTokenReplacement in drupal/core/modules/poll/lib/Drupal/poll/Tests/PollTokenReplaceTest.php
Creates a poll, then tests the tokens generated from it.

... See full list

File

drupal/core/modules/poll/lib/Drupal/poll/Tests/PollTestBase.php, line 125
Definition of Drupal\poll\Tests\PollTestBase.

Class

PollTestBase
Defines a base class for testing the Poll module.

Namespace

Drupal\poll\Tests

Code

function _generateChoices($count = 7) {
  $choices = array();
  for ($i = 1; $i <= $count; $i++) {
    $choices[] = $this
      ->randomName();
  }
  return $choices;
}