public function ViewExecutableTest::testSetOffsetBeforePreRender in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/ViewExecutableTest.php \Drupal\Tests\views\Unit\ViewExecutableTest::testSetOffsetBeforePreRender()
- 9 core/modules/views/tests/src/Unit/ViewExecutableTest.php \Drupal\Tests\views\Unit\ViewExecutableTest::testSetOffsetBeforePreRender()
@covers ::setOffset @covers ::getOffset
File
- core/
modules/ views/ tests/ src/ Unit/ ViewExecutableTest.php, line 615
Class
- ViewExecutableTest
- @coversDefaultClass \Drupal\views\ViewExecutable @group views
Namespace
Drupal\Tests\views\UnitCode
public function testSetOffsetBeforePreRender() {
/** @var \Drupal\views\ViewExecutable|\PHPUnit\Framework\MockObject\MockObject $view */
/** @var \Drupal\views\Plugin\views\display\DisplayPluginBase|\PHPUnit\Framework\MockObject\MockObject $display */
[
$view,
$display,
] = $this
->setupBaseViewAndDisplay();
$view
->setOffset(12);
$this
->assertEquals(12, $view
->getOffset());
$this
->assertContains('offset:12', $view->element['#cache']['keys']);
}