You are here

protected function RngViewsTest::setUp in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/Views/RngViewsTest.php \Drupal\Tests\rng\Kernel\Views\RngViewsTest::setUp()
  2. 3.x tests/src/Kernel/Views/RngViewsTest.php \Drupal\Tests\rng\Kernel\Views\RngViewsTest::setUp()

@inheritdoc

Overrides ViewsKernelTestBase::setUp

File

tests/src/Kernel/Views/RngViewsTest.php, line 59

Class

RngViewsTest
Tests RNG field plugins.

Namespace

Drupal\Tests\rng\Kernel\Views

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp($import_test_views);
  $this->eventManager = $this->container
    ->get('rng.event_manager');
  $this
    ->installConfig([
    'field',
  ]);
  $this
    ->installConfig([
    'rng',
  ]);
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('registration');
  $this
    ->installEntitySchema('registrant');
  $this
    ->installEntitySchema('rng_rule');
  $this
    ->installEntitySchema('rng_rule_component');
  ViewTestData::createTestViews(get_class($this), [
    'rng_test_views',
  ]);
  $this->registrationType = $this
    ->createRegistrationType();
  $this
    ->createEventType('entity_test', 'entity_test');
  $this->view = Views::getView('test_rng');
  $this->view
    ->setDisplay();
}