function EntityPermissionsRouteProviderWithCheckTest::testEntityPermissionsRouteProviderWithCheck
Tests the route provider deprecation.
@covers ::getEntityPermissionsRoute
@group legacy
File
-
core/
modules/ user/ tests/ src/ Unit/ Entity/ EntityPermissionsRouteProviderWithCheckTest.php, line 28
Class
- EntityPermissionsRouteProviderWithCheckTest
- Tests the route provider deprecation.
Namespace
Drupal\Tests\user\Unit\EntityCode
public function testEntityPermissionsRouteProviderWithCheck() : void {
// Mock the constructor parameters.
$prophecy = $this->prophesize(EntityTypeInterface::class);
$entity_type = $prophecy->reveal();
$prophecy = $this->prophesize(EntityTypeManagerInterface::class);
$prophecy->getDefinition('entity_type')
->willReturn($entity_type);
$entity_type_manager = $prophecy->reveal();
$this->expectDeprecation('Drupal\\user\\Entity\\EntityPermissionsRouteProviderWithCheck is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Use EntityPermissionsRouteProvider instead. See https://www.drupal.org/node/3384745');
(new EntityPermissionsRouteProviderWithCheck($entity_type_manager))->getRoutes($entity_type);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.