function EntityConverterTest::testDeprecatedLanguageManager
Tests that passing the language manager triggers a deprecation error.
@group legacy
@expectedDeprecation Calling EntityConverter::__construct() with the $entity_repository argument is supported in drupal:8.7.0 and will be required before drupal:9.0.0. See https://www.drupal.org/node/2549139.
File
-
core/
tests/ Drupal/ Tests/ Core/ ParamConverter/ EntityConverterTest.php, line 160
Class
- EntityConverterTest
- @coversDefaultClass \Drupal\Core\ParamConverter\EntityConverter @group ParamConverter @group Entity
Namespace
Drupal\Tests\Core\ParamConverterCode
public function testDeprecatedLanguageManager() {
$container_entity_repository = clone $this->entityRepository;
$this->setUpMocks([
'entity.repository' => $container_entity_repository,
]);
$language_manager = $this->createMock(LanguageManagerInterface::class);
$this->entityConverter = new EntityConverter($this->entityTypeManager, $language_manager);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.