diff --git a/src/Plugin/facets/url_processor/QueryString.php b/src/Plugin/facets/url_processor/QueryString.php index 537ba3e..cd5aafa 100644 --- a/src/Plugin/facets/url_processor/QueryString.php +++ b/src/Plugin/facets/url_processor/QueryString.php @@ -68,9 +68,8 @@ class QueryString extends UrlProcessorPluginBase { // Set the url alias from the the facet object. $this->urlAlias = $facet->getUrlAlias(); - $s = $facet->getFacetSource()->getPath(); - $s = str_replace('//', '/', $s); - $url = Url::fromUserInput($s); + $path = str_replace('//', '/', $facet->getFacetSource()->getPath()); + $url = Url::fromUserInput($path); $url->setOption('attributes', ['rel' => 'nofollow']); /** @var \Drupal\facets\Result\ResultInterface[] $results */ diff --git a/tests/src/Unit/FacetSource/FacetSourcePluginManagerTest.php b/tests/src/Unit/FacetSource/FacetSourcePluginManagerTest.php index ea41e74..99de6ab 100644 --- a/tests/src/Unit/FacetSource/FacetSourcePluginManagerTest.php +++ b/tests/src/Unit/FacetSource/FacetSourcePluginManagerTest.php @@ -84,7 +84,7 @@ class FacetSourcePluginManagerTest extends UnitTestCase { public function testConstruct() { $namespaces = new ArrayObject(); $sut = new FacetSourcePluginManager($namespaces, $this->cache, $this->moduleHandler); - $this->assertInstanceOf('\Drupal\facets\FacetSource\FacetSourcePluginManager', $sut); + $this->assertInstanceOf(FacetSourcePluginManager::class, $sut); } /**