You are here

public function ViewModeTest::setUp in Search API Pages 8

Overrides FunctionalTestBase::setUp

File

tests/src/Functional/ViewModeTest.php, line 15

Class

ViewModeTest
Provides web tests for Search API Pages.

Namespace

Drupal\Tests\search_api_page\Functional

Code

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

  // Create blog content type and create one node of this type.
  $this
    ->drupalCreateContentType([
    'type' => 'blog',
  ]);
  $this
    ->drupalCreateNode([
    'title' => 'Title blog number 1',
    'type' => 'blog',
    'body' => [
      [
        'value' => 'This is the body text for blog number 1.',
      ],
    ],
  ]);

  // Create document content type and create one node of this type.
  $this
    ->drupalCreateContentType([
    'type' => 'document',
  ]);
  $this
    ->drupalCreateNode([
    'title' => 'Title document number 1',
    'type' => 'document',
    'body' => [
      [
        'value' => 'This is the body text for document number 1.',
      ],
    ],
  ]);
}