public function ControllerBaseTest::testPageGeneration in MongoDB 8.2
Test page generation for various data set shapes.
@covers ::getPage
@dataProvider pageGenerationData
File
- modules/
mongodb_watchdog/ tests/ src/ Unit/ ControllerBaseTest.php, line 28
Class
- ControllerBaseTest
- Test the ControllerBase mechanisms.
Namespace
Drupal\Tests\mongodb_watchdog\UnitCode
public function testPageGeneration(int $requestedPage, int $count, int $expected) {
$actual = ControllerBase::getPage($count, $requestedPage, static::ITEMS_PER_PAGE);
$this
->assertEquals($expected, $actual);
}