You are here

public function AcquiaConnectorSearchOverrideTest::setUp in Acquia Connector 8

Overrides BrowserTestBase::setUp

File

acquia_search/tests/src/Functional/AcquiaConnectorSearchOverrideTest.php, line 77

Class

AcquiaConnectorSearchOverrideTest
Tests the automatic switching behavior of the Acquia Search module.

Namespace

Drupal\Tests\acquia_search\Functional

Code

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

  // Generate and store a random set of credentials.
  $this->id = 'TEST_AcquiaConnectorTestID';
  $this->key = 'TEST_AcquiaConnectorTestKey';
  $this->salt = $this
    ->randomString(32);
  $this->server = 'acquia_search_server';
  $this->index = 'acquia_search_index';

  // 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();
  $this
    ->setAvailableSearchCores();
}