Skip to content
Snippets Groups Projects
Commit 3ae4ee55 authored by Erik Stielstra's avatar Erik Stielstra
Browse files

Fix phpunit deprectation for D9 compatibility.

parent c93db62a
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ class ExtraFieldDisplayManagerTest extends KernelTestBase {
/**
* The plugin manager under test.
*
* @var \Drupal\extra_field\Plugin\ExtraFieldDisplayManager
* @var \Drupal\extra_field\Plugin\ExtraFieldDisplayManager|\PHPUnit\Framework\MockObject\MockObject
*/
protected $displayManager;
......@@ -37,10 +37,18 @@ class ExtraFieldDisplayManagerTest extends KernelTestBase {
$cache_backend = $this->container->get('cache.discovery');
$module_handler = $this->container->get('module_handler');
$entity_type_manager = $this->container->get('entity_type.manager');
$this->displayManager = $this->getMock('Drupal\extra_field\Plugin\ExtraFieldDisplayManager', [
'getDefinitions',
'allEntityBundles',
], [$namespaces, $cache_backend, $module_handler, $entity_type_manager]);
$this->displayManager = $this->getMockBuilder('Drupal\extra_field\Plugin\ExtraFieldDisplayManager')
->setMethods([
'getDefinitions',
'allEntityBundles',
])
->setConstructorArgs([
$namespaces,
$cache_backend,
$module_handler,
$entity_type_manager,
])
->getMock();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment