You are here

protected function AcquiaConnectorSearchOverrideTest::caseAcquiaHostingEnvironmentDetected in Acquia Search 2.x

Acquia Dev hosting environment detected.

Configs point to the index on the Dev environment.

1 call to AcquiaConnectorSearchOverrideTest::caseAcquiaHostingEnvironmentDetected()
AcquiaConnectorSearchOverrideTest::testOverrides in tests/src/Functional/AcquiaConnectorSearchOverrideTest.php
Main function that calls the rest of the tests (names start with case*)

File

tests/src/Functional/AcquiaConnectorSearchOverrideTest.php, line 139

Class

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

Namespace

Drupal\Tests\acquia_search\Functional

Code

protected function caseAcquiaHostingEnvironmentDetected() {
  $overrides = [
    'env-overrides' => 1,
    'AH_SITE_ENVIRONMENT' => 'dev',
    'AH_SITE_NAME' => 'testsite1dev',
    'AH_SITE_GROUP' => 'testsite1',
  ];
  $this
    ->drupalGet('/admin/config/search/search-api/server/' . $this->server, [
    'query' => $overrides,
  ]);
  $this
    ->assertNoText('automatically enforced read-only mode on this connection.');
  $this
    ->assertNoText('The following Acquia Search Solr index IDs would have worked for your current environment');

  //phpcs:disable

  //$delete_btn = $this->xpath('//input[@value="Delete all indexed data on this server"]');

  //$this->assertEqual($delete_btn[0]->getAttribute('disabled'), 'disabled');

  //phpcs:enable
  $this
    ->drupalGet('/admin/config/search/search-api/index/' . $this->index, [
    'query' => $overrides,
  ]);
  $this
    ->assertNoText('automatically enforced read-only mode on this connection.');
  $this
    ->assertNoText('The following Acquia Search Solr index IDs would have worked for your current environment');
}