function PagerPluginBaseTest::setUp
Same name in other branches
- 8.9.x core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::setUp()
- 10 core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::setUp()
- 11.x core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\pager\PagerPluginBaseTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ pager/ PagerPluginBaseTest.php, line 30
Class
- PagerPluginBaseTest
- @coversDefaultClass \Drupal\views\Plugin\views\pager\PagerPluginBase @group views
Namespace
Drupal\Tests\views\Unit\Plugin\pagerCode
protected function setUp() : void {
$this->pager = $this->getMockBuilder('Drupal\\views\\Plugin\\views\\pager\\PagerPluginBase')
->disableOriginalConstructor()
->getMockForAbstractClass();
$view = $this->getMockBuilder('Drupal\\views\\ViewExecutable')
->disableOriginalConstructor()
->getMock();
$display = $this->getMockBuilder('Drupal\\views\\Plugin\\views\\display\\DisplayPluginBase')
->disableOriginalConstructor()
->getMock();
$options = [
'items_per_page' => 5,
'offset' => 1,
];
$this->pager
->init($view, $display, $options);
$this->pager->current_page = 1;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.