Skip to content
Snippets Groups Projects
Commit a2ebba14 authored by Matt Glaman's avatar Matt Glaman Committed by Jakob P
Browse files

Issue #3324440 by mglaman: Search breaks after upgrade to 3.1

parent e729f3ef
No related branches found
No related tags found
1 merge request!14Issue #3324440: Search breaks after upgrade to 3.1
......@@ -124,7 +124,8 @@ class SearchApiSolrAcquiaConnector extends SolrConnectorPluginBase implements
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
// Our schema (8.1.7) is newer than Solr's version, 4.1.1.
$configuration['skip_schema_check'] = TRUE;
// Ensure platform config is always used.
$configuration = array_merge($configuration, self::getPlatformConfig());
$instance = new static(
$configuration,
$plugin_id,
......
......@@ -65,6 +65,23 @@ final class SearchApiSolrAcquiaConnectorTest extends UnitTestCase {
);
}
public function testCoreLinkWithExistingConfiguration(): void {
$container = $this->createContainerMock();
$sut = $this->createInstance($container, [
'port' => '8983',
'scheme' => 'http',
]);
// '<a href="https://foobarbaz.host:443/solr/FooBarBaz/">https://foobarbaz.host:443/solr/FooBarBaz/</a>'
self::assertEquals(
[
'#type' => 'link',
'#url' => Url::fromUri('https://solr.acquia.com:443/solr/abc123.prod/'),
'#title' => 'https://solr.acquia.com:443/solr/abc123.prod/',
],
$sut->getCoreLink()->toRenderable()
);
}
public function testPingServer(): void {
$ping_response = Json::encode([
'core' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment