protected function AcquiaConnectorSearchOverrideTest::caseAcquiaHostingProdEnvironmentDetectedWithProdFlag in Acquia Connector 8
Acquia Prod environment and a DB name and AH_PRODUCTION is set.
So it should override to connect to the prod index.
1 call to AcquiaConnectorSearchOverrideTest::caseAcquiaHostingProdEnvironmentDetectedWithProdFlag()
- AcquiaConnectorSearchOverrideTest::testOverrides in acquia_search/
tests/ src/ Functional/ AcquiaConnectorSearchOverrideTest.php - Main function that calls the rest of the tests (names start with case*)
File
- acquia_search/
tests/ src/ Functional/ AcquiaConnectorSearchOverrideTest.php, line 238
Class
- AcquiaConnectorSearchOverrideTest
- Tests the automatic switching behavior of the Acquia Search module.
Namespace
Drupal\Tests\acquia_search\FunctionalCode
protected function caseAcquiaHostingProdEnvironmentDetectedWithProdFlag() {
$overrides = [
'env-overrides' => 1,
'AH_SITE_ENVIRONMENT' => 'prod',
'AH_SITE_NAME' => 'testsite1prod',
'AH_SITE_GROUP' => 'testsite1',
'AH_PRODUCTION' => 1,
];
$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');
}