You are here

protected function ExtraFieldDisplayManagerTest::setUp in Extra Field 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/ExtraFieldDisplayManagerTest.php, line 31

Class

ExtraFieldDisplayManagerTest
@coversDefaultClass \Drupal\extra_field\Plugin\ExtraFieldDisplayManager

Namespace

Drupal\Tests\extra_field\Kernel

Code

protected function setUp() {
  parent::setUp();
  $namespaces = $this->container
    ->get('container.namespaces');
  $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
    ->getMockBuilder('Drupal\\extra_field\\Plugin\\ExtraFieldDisplayManager')
    ->setMethods([
    'getDefinitions',
    'allEntityBundles',
  ])
    ->setConstructorArgs([
    $namespaces,
    $cache_backend,
    $module_handler,
    $entity_type_manager,
  ])
    ->getMock();
}