You are here

protected function RestExportNestedTest::setUp in REST Export Nested 8

Overrides ViewTestBase::setUp

File

tests/src/Functional/RestExportNestedTest.php, line 51

Class

RestExportNestedTest
Tests views REST export nested.

Namespace

Drupal\Tests\rest_export_nested\Functional

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp($import_test_views);
  $this
    ->createContentType([
    'type' => 'page',
  ]);
  $this
    ->createNode([
    'status' => TRUE,
    'type' => 'page',
    'title' => 'test page',
  ]);
  ViewTestData::createTestViews(static::class, [
    'rest_nested_test',
  ]);
  $this->view = Views::getView('nested_data');
  $this->view
    ->setDisplay('rest_export_nested_1');
}