You are here

public function AcquiaSearchOverrideTest::testNonAcquiaHosted in Acquia Search 2.x

No Acquia hosting and DB detected - should override into Readonly.

File

tests/src/Kernel/AcquiaSearchOverrideTest.php, line 61

Class

AcquiaSearchOverrideTest
Tests for Acquia Search override cores.

Namespace

Drupal\Tests\acquia_search\Kernel

Code

public function testNonAcquiaHosted() {
  $this
    ->setAvailableSearchCores();
  $connector_plugin = new SearchApiSolrAcquiaConnector([], 'foo', [
    'foo',
  ]);
  $solr_connector = $connector_plugin
    ->create($this->container, [], 'foo', [
    'foo',
  ]);
  $config = $solr_connector
    ->defaultConfiguration();
  $this
    ->assertEquals(ACQUIA_SEARCH_AUTO_OVERRIDE_READ_ONLY, $config['overridden_by_acquia_search']);
  $this
    ->assertGetUpdateQueryException($solr_connector);
}