protected function AcquiaConnectorSearchOverrideTest::connect in Acquia Search 2.x
Connect to the Acquia Subscription.
1 call to AcquiaConnectorSearchOverrideTest::connect()
- AcquiaConnectorSearchOverrideTest::setUp in tests/
src/ Functional/ AcquiaConnectorSearchOverrideTest.php
File
- tests/
src/ Functional/ AcquiaConnectorSearchOverrideTest.php, line 268
Class
- AcquiaConnectorSearchOverrideTest
- Tests the automatic switching behavior of the Acquia Search module.
Namespace
Drupal\Tests\acquia_search\FunctionalCode
protected function connect() {
\Drupal::configFactory()
->getEditable('acquia_connector.settings')
->set('spi.ssl_verify', FALSE)
->save();
\Drupal::configFactory()
->getEditable('acquia_connector.settings')
->set('spi.ssl_override', TRUE)
->save();
\Drupal::configFactory()
->getEditable('acquia_connector.settings')
->set('spi.server', 'http://mock-spi-server')
->save();
$admin_user = $this
->createAdminUser();
$this
->drupalLogin($admin_user);
$edit_fields = [
'acquia_identifier' => $this->id,
'acquia_key' => $this->key,
];
$submit_button = 'Connect';
$this
->drupalPostForm('admin/config/system/acquia-connector/credentials', $edit_fields, $submit_button);
\Drupal::service('module_installer')
->install([
'acquia_search',
]);
}