function PagerManagerTest::providerTestGetMaxPagerElementId

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Pager/PagerManagerTest.php \Drupal\KernelTests\Core\Pager\PagerManagerTest::providerTestGetMaxPagerElementId()
  2. 11.x 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,
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.