You are here

public function AcquiaConnectorSearchTest::testEnvironment in Acquia Connector 8

Tests Acquia Search environment creation.

Tests executed:

  • Acquia Search environment is saved and loaded.
  • Acquia Search environment is set as the default environment when created.
  • The service class is set to AcquiaSearchService.
  • The environment's URL is built as expected.

File

acquia_search/tests/src/Functional/AcquiaConnectorSearchTest.php, line 146

Class

AcquiaConnectorSearchTest
Tests the functionality of the Acquia Search module.

Namespace

Drupal\Tests\acquia_search\Functional

Code

public function testEnvironment() {

  // Connect site on key and id.
  $this
    ->drupalGet('admin/config/search/search-api');
  $environment = Server::load('acquia_search_server');

  // Check if the environment is a valid variable.
  $this
    ->assertInstanceOf(Server::class, $environment, t('Acquia Search environment saved.'));
}