class FieldUiRouteEnhancerTest
Same name in this branch
- 9 core/modules/field_ui/tests/src/Unit/FieldUiRouteEnhancerTest.php \Drupal\Tests\field_ui\Unit\FieldUiRouteEnhancerTest
Tests that the service "field_ui.route_enhancer" has been deprecated.
@group field_ui @group legacy
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\field_ui\Kernel\FieldUiRouteEnhancerTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of FieldUiRouteEnhancerTest
File
-
core/
modules/ field_ui/ tests/ src/ Kernel/ FieldUiRouteEnhancerTest.php, line 13
Namespace
Drupal\Tests\field_ui\KernelView source
class FieldUiRouteEnhancerTest extends KernelTestBase {
/**
* Modules to install.
*
* @var string[]
*/
protected static $modules = [
'field_ui',
];
/**
* Tests deprecation of the "field_ui.route_enhancer" service.
*/
public function testFieldUiRouteEnhancerDeprecation() {
$this->expectDeprecation('The "field_ui.route_enhancer" service is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use the "route_enhancer.entity_bundle" service instead. See https://www.drupal.org/node/3245017');
$legacy_service = \Drupal::service('field_ui.route_enhancer');
$new_service = \Drupal::service('route_enhancer.entity_bundle');
$this->assertSame($new_service, $legacy_service);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.