protected function AcquiaSearchOverrideTest::assertGetUpdateQueryException in Acquia Connector 8
Asserts if the Solr Connector getUpdateQuery() method throws exception.
Parameters
\Drupal\acquia_search\Plugin\SolrConnector\SearchApiSolrAcquiaConnector $solr_connector: SearchApiSolrAcquiaConnector.
Throws
\Exception If the Search API Server is currently in read-only mode.
3 calls to AcquiaSearchOverrideTest::assertGetUpdateQueryException()
- AcquiaSearchOverrideTest::testAcquiaHostingEnvironmentDetectedNoAvailableCores in acquia_search/
tests/ src/ Kernel/ AcquiaSearchOverrideTest.php - Tests environment detection without cores available.
- AcquiaSearchOverrideTest::testAcquiaHostingProdEnvironmentDetectedWithoutProdFlag in acquia_search/
tests/ src/ Kernel/ AcquiaSearchOverrideTest.php - Tests read-only.
- AcquiaSearchOverrideTest::testNonAcquiaHosted in acquia_search/
tests/ src/ Kernel/ AcquiaSearchOverrideTest.php - No Acquia hosting and DB detected - should override into Readonly.
File
- acquia_search/
tests/ src/ Kernel/ AcquiaSearchOverrideTest.php, line 238
Class
- AcquiaSearchOverrideTest
- Tests for Acquia Search override cores.
Namespace
Drupal\Tests\acquia_search\KernelCode
protected function assertGetUpdateQueryException(SearchApiSolrAcquiaConnector $solr_connector) {
// Set the expectation for exception.
$this
->expectExceptionMessage('The Search API Server serving this index is currently in read-only mode.');
// Run the code that should throw the exception.
// If exception occurred - test passes. If no exception occurred - test
// fails.
$solr_connector
->getUpdateQuery();
}