You are here

protected function AcquiaConnectorSearchTest::setUp in Acquia Search 2.x

Overrides BrowserTestBase::setUp

File

tests/src/Functional/AcquiaConnectorSearchTest.php, line 81

Class

AcquiaConnectorSearchTest
Tests the functionality of the Acquia Search module.

Namespace

Drupal\Tests\acquia_search\Functional

Code

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

  // Generate and store a random set of credentials.
  $this->id = $this
    ->randomString(10);
  $this->key = $this
    ->randomString(32);
  $this->salt = $this
    ->randomString(32);
  $this->server = 'acquia_search_server';
  $this->index = 'acquia_search_index';
  $this->settingsPath = 'admin/config/search/search-api';

  // Create a new content type.
  $content_type = $this
    ->drupalCreateContentType();

  // Add a node of the new content type.
  $node_data = [
    'type' => $content_type
      ->id(),
  ];
  $this
    ->drupalCreateNode($node_data);
  $this
    ->connect();
}