public function AcquiaSearchOverrideTest::testAcquiaHostingProdEnvironmentDetectedWithoutProdFlag in Acquia Search 2.x
Tests read-only.
Acquia Prod environment and a DB name but AH_PRODUCTION isn't set - so read only.
File
- tests/
src/ Kernel/ AcquiaSearchOverrideTest.php, line 154
Class
- AcquiaSearchOverrideTest
- Tests for Acquia Search override cores.
Namespace
Drupal\Tests\acquia_search\KernelCode
public function testAcquiaHostingProdEnvironmentDetectedWithoutProdFlag() {
$_ENV['AH_SITE_ENVIRONMENT'] = 'prod';
$_ENV['AH_SITE_NAME'] = 'testsite1prod';
$_ENV['AH_SITE_GROUP'] = 'testsite1';
$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);
}