You are here

protected function IntegrationTest::setUp in Drupal 8

Same name in this branch
  1. 8 core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php \Drupal\Tests\aggregator\Kernel\Views\IntegrationTest::setUp()
  2. 8 core/modules/statistics/tests/src/Functional/Views/IntegrationTest.php \Drupal\Tests\statistics\Functional\Views\IntegrationTest::setUp()
Same name and namespace in other branches
  1. 9 core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php \Drupal\Tests\aggregator\Kernel\Views\IntegrationTest::setUp()

Parameters

bool $import_test_views: Should the views specified on the test class be imported. If you need to setup some additional stuff, like fields, you need to call false and then call createTestViews for your own.

Overrides ViewsKernelTestBase::setUp

File

core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php, line 58

Class

IntegrationTest
Tests basic integration of views data from the aggregator module.

Namespace

Drupal\Tests\aggregator\Kernel\Views

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp();
  $this
    ->installEntitySchema('aggregator_item');
  $this
    ->installEntitySchema('aggregator_feed');
  ViewTestData::createTestViews(get_class($this), [
    'aggregator_test_views',
  ]);
  $this->itemStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('aggregator_item');
  $this->feedStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('aggregator_feed');
}