You are here

public function PagerManagerTest::providerTestGetMaxPagerElementId in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php \Drupal\KernelTests\Core\Pager\PagerManagerTest::providerTestGetMaxPagerElementId()

Provides test cases for PagerManagerTest::testGetMaxPagerElementId().

Return value

array An array of test cases, each which the following values:

  • Array of elements to pass to PagerManager::createPager().
  • The expected value returned by PagerManager::getMaxPagerElementId().

File

core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php, line 80

Class

PagerManagerTest
@group Pager

Namespace

Drupal\KernelTests\Core\Pager

Code

public function providerTestGetMaxPagerElementId() : array {
  return [
    'no_pager' => [
      [],
      -1,
    ],
    'single_pager' => [
      [
        0,
      ],
      0,
    ],
    'multiple_pagers' => [
      [
        30,
        10,
        20,
      ],
      30,
    ],
  ];
}