You are here

protected function PollVoteMultilingualTest::setUp in Poll 8

Overrides PollTestBase::setUp

File

tests/src/Functional/PollVoteMultilingualTest.php, line 39

Class

PollVoteMultilingualTest
Tests multilingual voting on a poll.

Namespace

Drupal\Tests\poll\Functional

Code

protected function setUp() {
  parent::setUp();

  // Allow anonymous users to vote on polls.
  user_role_change_permissions(AccountInterface::ANONYMOUS_ROLE, array(
    'cancel own vote' => TRUE,
    'access polls' => TRUE,
  ));
  $this->poll = $this
    ->pollCreate(3);
  $this->poll
    ->setAnonymousVoteAllow(TRUE)
    ->save();
}