You are here

public function MixItUpFuncTest::setUp in MixItUp Views 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/MixItUpFuncTest.php \Drupal\Tests\mixitup_views\Kernel\MixItUpFuncTest::setUp()

Before a test method is run, setUp() is invoked.

Create new unit object.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

\Drupal\Core\Entity\EntityStorageException

Overrides KernelTestBase::setUp

File

tests/src/Kernel/MixItUpFuncTest.php, line 70

Class

MixItUpFuncTest
Class MixItUpFuncTest.

Namespace

Drupal\Tests\mixitup_views\Kernel

Code

public function setUp() {
  parent::setUp();

  // Installing entities schema.
  $this
    ->installSchema('system', [
    'sequences',
    'key_value_expire',
  ]);
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installEntitySchema('node');

  // Generating test content and creating instance for the class to be tested.
  $this->serviceContainer = \Drupal::getContainer();
  $this->entityTypeManager = $this->serviceContainer
    ->get('entity_type.manager');
  $this->defaultOptions = $this->serviceContainer
    ->get('mixitup_views.default_options_service');
  $this->testObject = $this->serviceContainer
    ->get('mixitup_views.func_service');
  $this
    ->generateTestContent();
}