function PollTestBase::pollUpdate

Tests updating a poll.

2 calls to PollTestBase::pollUpdate()
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.

File

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

Class

PollTestBase
Defines a base class for testing the Poll module.

Namespace

Drupal\poll\Tests

Code

function pollUpdate($nid, $title, $edit) {

  // Edit the poll node.
  $this
    ->drupalPost('node/' . $nid . '/edit', $edit, t('Save'));
  $this
    ->assertText(t('@type @title has been updated.', array(
    '@type' => node_type_get_label('poll'),
    '@title' => $title,
  )), 'Poll has been updated.');
}