protected function AcquiaSearchOverrideTest::assertGetUpdateQueryException in Acquia Search 2.x
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 tests/
src/ Kernel/ AcquiaSearchOverrideTest.php - Tests environment detection without cores available.
- AcquiaSearchOverrideTest::testAcquiaHostingProdEnvironmentDetectedWithoutProdFlag in tests/
src/ Kernel/ AcquiaSearchOverrideTest.php - Tests read-only.
- AcquiaSearchOverrideTest::testNonAcquiaHosted in tests/
src/ Kernel/ AcquiaSearchOverrideTest.php - No Acquia hosting and DB detected - should override into Readonly.
File
- 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();
}