function BlockTest::testBuildOverride
Tests the build method with overriding items per page.
Attributes
#[TestWith([
5,
5,
])]
#[TestWith([
"5",
5,
])]
File
- 
              core/modules/ views/ tests/ src/ Unit/ Plugin/ views/ display/ BlockTest.php, line 90 
Class
Namespace
Drupal\Tests\views\Unit\Plugin\views\displayCode
public function testBuildOverride(mixed $input, int $expected) : void {
  $this->executable
    ->expects($this->once())
    ->method('setItemsPerPage')
    ->with($expected);
  $this->blockPlugin
    ->expects($this->once())
    ->method('getConfiguration')
    ->willReturn([
    'items_per_page' => $input,
  ]);
  $this->blockDisplay
    ->preBlockBuild($this->blockPlugin);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
