You are here

protected function FocalPointCollectorTest::setUp in Acquia Content Hub 8.2

Throws

\Exception

Overrides KernelTestBase::setUp

File

tests/src/Kernel/DependencyCollector/FocalPointCollectorTest.php, line 72

Class

FocalPointCollectorTest
Test focal point dependency collector.

Namespace

Drupal\Tests\acquia_contenthub\Kernel\DependencyCollector

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installConfig('node');
  $this
    ->installConfig('field');
  $this
    ->installConfig('filter');
  $this
    ->installConfig('file');
  $this
    ->installConfig('focal_point');
  $this
    ->installEntitySchema('path_alias');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('crop');
  $this
    ->installEntitySchema('file');
  $this
    ->installSchema('file', [
    'file_usage',
  ]);
  $this
    ->createContentType([
    'type' => self::BUNDLE,
    'name' => self::BUNDLE,
  ]);
  $this
    ->addField();

  /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
  $entity_type_manager = $this->container
    ->get('entity_type.manager');
  $this->cropStorage = $entity_type_manager
    ->getStorage('crop');
  $this->calculator = \Drupal::service('entity.dependency.calculator');
}