You are here

public function PagerPluginBaseTest::testGetPagerId in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::testGetPagerId()

Tests the getPagerId() method.

See also

\Drupal\views\Plugin\views\pager\PagerPluginBase::getPagerId()

File

core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php, line 130
Contains \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest.

Class

PagerPluginBaseTest
@coversDefaultClass \Drupal\views\Plugin\views\pager\PagerPluginBase @group views

Namespace

Drupal\Tests\views\Unit\Plugin\pager

Code

public function testGetPagerId() {

  // Should return 0 if 'id' is not set.
  $this
    ->assertEquals(0, $this->pager
    ->getPagerId());
  $this->pager->options['id'] = 1;
  $this
    ->assertEquals(1, $this->pager
    ->getPagerId());
}