entity_hierarchy-8.x-2.24/tests/src/Kernel/EntityHierarchyKernelTestBase.php

tests/src/Kernel/EntityHierarchyKernelTestBase.php
<?php

namespace Drupal\Tests\entity_hierarchy\Kernel;

use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
use Drupal\Tests\entity_hierarchy\Traits\EntityHierarchyTestTrait;

/**
 * Defines a base class for entity hierarchy tests.
 */
abstract class EntityHierarchyKernelTestBase extends EntityKernelTestBase {

  use EntityHierarchyTestTrait;

  const FIELD_NAME = 'parents';
  const ENTITY_TYPE = 'entity_test';

  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'entity_hierarchy',
    'entity_test',
    'system',
    'user',
    'dbal',
    'field',
  ];

  /**
   * {@inheritdoc}
   */
  protected function setUp(): void {
    parent::setUp();
    $this->installEntitySchema(static::ENTITY_TYPE);
    $this->setupEntityHierarchyField(static::ENTITY_TYPE, static::ENTITY_TYPE, static::FIELD_NAME);
    $this->additionalSetup();
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc