class PagerDeprecationTest
Ensure that deprecated pager functions trigger deprecation errors.
@group Pager @group legacy
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\AssertHelperTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\PhpunitCompatibilityTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\system\Kernel\Pager\PagerDeprecationTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of PagerDeprecationTest
File
-
core/
modules/ system/ tests/ src/ Kernel/ Pager/ PagerDeprecationTest.php, line 13
Namespace
Drupal\Tests\system\Kernel\PagerView source
class PagerDeprecationTest extends KernelTestBase {
/**
* @expectedDeprecation pager_find_page is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->findPage() instead. See https://www.drupal.org/node/2779457
*/
public function testFindPage() {
$this->assertInternalType('int', pager_find_page());
}
/**
* @expectedDeprecation pager_default_initialize is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface->createPager() instead. See https://www.drupal.org/node/2779457
*/
public function testDefaultInitialize() {
$this->assertInternalType('int', pager_default_initialize(1, 1));
}
/**
* @expectedDeprecation pager_get_query_parameters is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457
*/
public function testGetQueryParameters() {
$this->assertInternalType('array', pager_get_query_parameters());
}
/**
* @expectedDeprecation pager_query_add_page is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface->getUpdatedParameters() instead. See https://www.drupal.org/node/2779457
*/
public function testQueryAddPage() {
$this->assertArrayHasKey('page', pager_query_add_page([], 1, 1));
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
PagerDeprecationTest::testDefaultInitialize | public | function | @expectedDeprecation pager_default_initialize is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface->createPager() instead. See https://www.drupal.org/node/2779457 |
PagerDeprecationTest::testFindPage | public | function | @expectedDeprecation pager_find_page is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->findPage() instead. See https://www.drupal.org/node/2779457 |
PagerDeprecationTest::testGetQueryParameters | public | function | @expectedDeprecation pager_get_query_parameters is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerParametersInterface->getQueryParameters() instead. See https://www.drupal.org/node/2779457 |
PagerDeprecationTest::testQueryAddPage | public | function | @expectedDeprecation pager_query_add_page is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface->getUpdatedParameters() instead. See https://www.drupal.org/node/2779457 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.