You are here

protected function BlazyKernelTestTrait::setUpKernelManager in Blazy 8

Same name and namespace in other branches
  1. 8.2 tests/src/Traits/BlazyKernelTestTrait.php \Drupal\Tests\blazy\Traits\BlazyKernelTestTrait::setUpKernelManager()

Setup common Kernel manager classes.

3 calls to BlazyKernelTestTrait::setUpKernelManager()
BlazyEntityReferenceFormatterTest::setUp in tests/src/Kernel/BlazyEntityReferenceFormatterTest.php
BlazyKernelTestBase::setUp in tests/src/Kernel/BlazyKernelTestBase.php
Set the default field storage backend for fields created during tests.
BlazyViewsTestBase::setUp in tests/src/Kernel/Views/BlazyViewsTestBase.php

File

tests/src/Traits/BlazyKernelTestTrait.php, line 32

Class

BlazyKernelTestTrait
A trait common for Kernel tests.

Namespace

Drupal\Tests\blazy\Traits

Code

protected function setUpKernelManager() {
  $this->root = $this->container
    ->get('app.root');
  $this->fileSystem = $this->container
    ->get('file_system');
  $this->entityManager = $this->container
    ->get('entity.manager');
  $this->entityFieldManager = $this->container
    ->get('entity_field.manager');
  $this->fieldTypePluginManager = $this->container
    ->get('plugin.manager.field.field_type');
  $this->formatterPluginManager = $this->container
    ->get('plugin.manager.field.formatter');
  $this->blazyManager = $this->container
    ->get('blazy.manager');
  $this->blazyFormatterManager = $this->container
    ->get('blazy.formatter.manager');
  $this->blazyAdminFormatter = $this->container
    ->get('blazy.admin.formatter');
  $this->blazyAdmin = $this->container
    ->get('blazy.admin');
  $this->blazyAdminExtended = $this->container
    ->get('blazy.admin.extended');

  // Enable Responsive image support.
  $this->blazyManager
    ->getConfigFactory()
    ->getEditable('blazy.settings')
    ->set('responsive_image', TRUE)
    ->save();
}