1 pager_example.test public PagerExampleTestCase::testPagerPage()

Verify the functionality of the example module.

File

modules/examples/pager_example/tests/pager_example.test, line 25
Simpletest case for pager_example module.

Class

PagerExampleTestCase
Functionality tests for the pager example module.

Code

public function testPagerPage() {
  // No need to login for this test.
  $this->backdropGet('examples/pager_example');
  $this->assertText('next', 'Found next link');
  $this->assertText('last', 'Found last link');

  // On the first page we shouldn't see the first
  // or previous links.
  $this->assertNoText('first', 'No first link on the first page');
  $this->assertNoText('previous', 'No previous link on the first page');

  // Let's go to the second page.
  $this->backdropGet('examples/pager_example', array('query' => array('page' => 1)));
  $this->assertText('next', 'Found next link');
  $this->assertText('last', 'Found last link');

  // On the second page we should also see the first
  // and previous links.
  $this->assertText('first', 'Found first link');
  $this->assertText('previous', 'Found previous link');
}