You are here

function PollFieldUITest::testPollHelpLinks in Poll 8

Tests if the links on the Poll Help-page are working properly.

File

tests/src/Functional/PollFieldUITest.php, line 90

Class

PollFieldUITest
Tests the poll field UI.

Namespace

Drupal\Tests\poll\Functional

Code

function testPollHelpLinks() {
  $this
    ->drupalGet('admin/help/poll');
  $this
    ->clickLink('Poll module');
  $this
    ->assertUrl('https://www.drupal.org/docs/contributed-modules/poll');
  $this
    ->drupalGet('admin/help/poll');
  $this
    ->clickLink('Add a poll');
  $this
    ->assertUrl('poll/add');
  $this
    ->drupalGet('admin/help/poll');
  $this
    ->clickLink('Polls', 0);
  $this
    ->assertUrl('admin/content/poll');
  $this
    ->drupalGet('admin/help/poll');
  $this
    ->clickLink('Polls', 1);
  $this
    ->assertUrl('admin/content/poll');
  $this
    ->drupalGet('admin/help/poll');
  $this
    ->clickLink('Blocks administration page');
  $this
    ->assertUrl('admin/structure/block');
  $this
    ->drupalGet('admin/help/poll');
  $this
    ->clickLink('Configure Poll permissions');
  $this
    ->assertUrl('admin/people/permissions#module-poll');
}