public function ViewsPagerTestCase::testPagerSkipping in Date 7.3
Same name and namespace in other branches
- 7.2 date_views/tests/date_views_pager.test \ViewsPagerTestCase::testPagerSkipping()
Test pager skipping.
File
- date_views/
tests/ date_views_pager.test, line 104 - Views date pager test.
Class
- ViewsPagerTestCase
- Test Date views pager functions.
Code
public function testPagerSkipping() {
// Go to view admin page.
$this
->drupalGet('admin/structure/views/view/display/test_date_pager/edit');
// Go to pager options.
$this
->drupalGet('admin/structure/views/nojs/display/test_date_pager/default/pager_options');
// Check if "Skip empty pages" text - exist.
$this
->assertText('Skip empty pages');
// Check if field and it's value is correct.
$this
->assertFieldByName('pager_options[skip_empty_pages]', '1');
// Go back to view admin page.
$this
->drupalGet('admin/structure/views/view/display/test_date_pager/edit');
// Check if pager on empty page are gone.
$this
->assertNoText('« Prev', 'Previous pager does not exist');
$this
->assertNoText('Next »', 'Next pager does not exist');
}