Commit 2e00f303 authored by jurcello's avatar jurcello Committed by Jur de Vries

Issue #2588787 by jurcello: FacetAdapter is a confusing name, should be FacetManager

parent a2d195f4
......@@ -15,8 +15,8 @@ Later on we will replace the hooks by events.
### Searchers (hook_facetapi_searcher_info)
Searchers are synonymous with search pages, or environments. Multiple
searchers can share the same adapter class, but each searcher will spawn a
separate instance of the adapter. Each searcher must be unique, so it is
searchers can share the same facet_manager class, but each searcher will spawn a
separate instance of the facet_manager. Each searcher must be unique, so it is
common practice to prefix the name with the module implementing the hook,
such as "apachesolr@searcher-x", "search_api@searcher-y", etc.
......@@ -28,7 +28,7 @@ The searchers are used for the following things:
The info we need per searcher are:
- label
- Adapter
- FacetManager
- Url processor
- path
......@@ -45,9 +45,9 @@ source data be stored in Drupal. For example, if you are indexing external
RSS feeds, facets can be defined that filter by the field in the index that
stores the publication dates.
### Adapters
### FacetManagers
And adapter was a plugin in the drupal 7 module and will be the same in drupal 8.
And facet_manager was a plugin in the drupal 7 module and will be the same in drupal 8.
### Query types
......@@ -66,9 +66,9 @@ Builds base render array used as a starting point for rendering.
The processor constructs the base render array used by widgets across all
realms. It is responsible for mapping the raw data returned by the index to
human readable values, processing hierarchical data, and building the query
strings for each facet item via the adapter's url processor plugin.
strings for each facet item via the facet_manager's url processor plugin.
The processors are generated per facets in the processFacets method in the adapter.
The processors are generated per facets in the processFacets method in the facet_manager.
Dependencies are injected upon generation (in the constructor).
### FacetapiFacet (helper class)
......@@ -88,14 +88,14 @@ however custom plugis can be written to retrieve data from the path as well.
In addition to facet data retrieval, the url processor plugin is also
responsible for building facet links and setting breadcrumb trails.
Each adapter instance is associated with a single url processor plugin. The
plugin is associated with the adapter via hook_facetapi_searcher_info()
Each facet_manager instance is associated with a single url processor plugin. The
plugin is associated with the facet_manager via hook_facetapi_searcher_info()
implementations.
### Adapter (plugin)
### FacetManager (plugin)
Adapters are responsible for abstracting interactions with the Search backend
that are necessary for faceted search. The adapter is also responsible for
FacetManagers are responsible for abstracting interactions with the Search backend
that are necessary for faceted search. The facet_manager is also responsible for
retrieving facet information passed by the user via the url processor plugin
taking the appropriate action, whether it is checking dependencies for all
enabled facets or passing the appropriate query type plugin to the backend
......
......@@ -59,20 +59,20 @@ function facetapi_get_enabled_facets() {
* @param \Drupal\search_api\Query\QueryInterface $query
*/
function facetapi_search_api_query_alter(QueryInterface &$query) {
// Get the adapter derivative.
// Get the facet_manager derivative.
// Get the plugin manager.
/** @var \Drupal\facetapi\Adapter\AdapterPluginManagerInterface $plugin_manager */
$plugin_manager = \Drupal::service('plugin.manager.facetapi.adapter');
/** @var \Drupal\facetapi\FacetManager\FacetManagerPluginManagerInterface $plugin_manager */
$plugin_manager = \Drupal::service('plugin.manager.facetapi.manager');
// Get the searcher id.
// This is the id of the view.
$search_id = $query->getOption('search id');
$plugin_id = 'search_api_views';
$adapter = $plugin_manager->getMyOwnChangeLaterInstance($plugin_id, $search_id);
$manager = $plugin_manager->getMyOwnChangeLaterInstance($plugin_id, $search_id);
// Add the active filters.
$adapter->alterQuery($query);
$manager->alterQuery($query);
}
......
services:
plugin.manager.facetapi.adapter:
class: Drupal\facetapi\Adapter\AdapterPluginManager
plugin.manager.facetapi.manager:
class: Drupal\facetapi\FacetManager\FacetManagerPluginManager
parent: default_plugin_manager
plugin.manager.facetapi.query_type:
class: Drupal\facetapi\QueryType\QueryTypePluginManager
......
<?php
/**
* Contains Drupal\facetapi\Adapter\AdapterPluginManager
*/
namespace Drupal\facetapi\Adapter;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
class AdapterPluginManager extends DefaultPluginManager implements AdapterPluginManagerInterface {
/**
* @var \Drupal\facetapi\Adapter\AdapterInterface[]
*/
protected $adapters = [];
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/facetapi/adapter', $namespaces, $module_handler, 'Drupal\facetapi\Adapter\AdapterInterface', 'Drupal\facetapi\Annotation\FacetApiAdapter');
$this->alterInfo('facetapi_adapter_info');
$this->setCacheBackend($cache_backend, 'facetapi_adapter_plugins');
}
public function getMyOwnChangeLaterInstance($plugin_id, $search_id) {
if (isset($this->adapters[$search_id])) {
return $this->adapters[$search_id];
}
/** @var AdapterInterface $adapter */
$adapter = $this->createInstance($plugin_id, array());
$adapter->setSearchId($search_id);
$this->adapters[$search_id] = $adapter;
return $adapter;
}
}
......@@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\facetapi\Annotation\FacetApiAdapter.
* Contains \Drupal\facetapi\Annotation\FacetApiFacetManager.
*/
namespace Drupal\facetapi\Annotation;
......@@ -10,26 +10,26 @@ namespace Drupal\facetapi\Annotation;
use Drupal\Component\Annotation\Plugin;
/**
* Defines a Facet API Adapter annotation object.
* Defines a Facet API FacetManager annotation object.
*
* @see \Drupal\facetapi\FacetApiAdapterManager
* @see \Drupal\facetapi\FacetApiFacetManagerManager
* @see plugin_api
*
* @ingroup plugin_api
*
* @Annotation
*/
class FacetApiAdapter extends Plugin {
class FacetApiFacetManager extends Plugin {
/**
* The adapter plugin id
* The facet_manager plugin id
*
* @var string
*/
public $id;
/**
* The human-readable name of the adapter plugin
* The human-readable name of the facet_manager plugin
*
* @ingroup plugin_translatable
*
......@@ -38,7 +38,7 @@ class FacetApiAdapter extends Plugin {
public $label;
/**
* The adapter description.
* The facet_manager description.
*
* @ingroup plugin_translatable
*
......@@ -47,7 +47,7 @@ class FacetApiAdapter extends Plugin {
public $description;
/**
* Class used to retrieve derivative definitions of the adapter.
* Class used to retrieve derivative definitions of the facet_manager.
*
* @var string
*/
......
......@@ -22,14 +22,14 @@ use Drupal\Component\Annotation\Plugin;
class FacetApiQueryType extends Plugin {
/**
* The adapter plugin id
* The facet_manager plugin id
*
* @var string
*/
public $id;
/**
* The human-readable name of the adapter plugin
* The human-readable name of the facet_manager plugin
*
* @ingroup plugin_translatable
*
......@@ -38,7 +38,7 @@ class FacetApiQueryType extends Plugin {
public $label;
/**
* The adapter description.
* The facet_manager description.
*
* @ingroup plugin_translatable
*
......@@ -47,7 +47,7 @@ class FacetApiQueryType extends Plugin {
public $description;
/**
* Class used to retrieve derivative definitions of the adapter.
* Class used to retrieve derivative definitions of the facet_manager.
*
* @var string
*/
......
......@@ -21,7 +21,7 @@ use Drupal\Component\Annotation\Plugin;
class FacetApiUrlProcessor extends Plugin {
/**
* The adapter plugin id
* The facet_manager plugin id
*
* @var string
*/
......
......@@ -54,7 +54,7 @@ class FacetApiWidget extends Plugin {
public $queryType = [];
/**
* Class used to retrieve derivative definitions of the adapter.
* Class used to retrieve derivative definitions of the facet_manager.
*
* @var string
*/
......
......@@ -316,7 +316,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
*
* @return string
*/
public function getAdapterPluginId() {
public function getManagerPluginId() {
return 'search_api_views';
}
......
......@@ -154,10 +154,10 @@ interface FacetInterface extends ConfigEntityInterface {
/**
* Gets the adapter plugin id
* Gets the facet manager plugin id
* @return string
*/
public function getAdapterPluginId();
public function getManagerPluginId();
/**
* Sets a string representation of the Facet source plugin.
......
......@@ -2,14 +2,14 @@
/**
* @file
* Contains Drupal\facetapi\Adapter\AdapterInterface.
* Contains Drupal\facetapi\FacetManager\FacetManagerInterface.
*/
namespace Drupal\facetapi\Adapter;
namespace Drupal\facetapi\FacetManager;
use Drupal\facetapi\FacetInterface;
interface AdapterInterface {
interface FacetManagerInterface {
/**
* Set the search id.
......@@ -35,7 +35,7 @@ interface AdapterInterface {
* @param string $keys
* The search keys, or query text, submitted by the user.
*
* @return FacetapiAdapter
* @return FacetapiFacetManager
* An instance of this class.
*/
public function setSearchKeys($keys);
......@@ -85,7 +85,7 @@ interface AdapterInterface {
*
* This method is called by the implementing module to initialize the facet
* display process. The following actions are taken:
* - FacetapiAdapter::initActiveFilters() hook is invoked.
* - FacetapiFacetManager::initActiveFilters() hook is invoked.
* - Dependency plugins are instantiated and executed.
* - Query type plugins are executed.
*
......@@ -95,12 +95,12 @@ interface AdapterInterface {
* @todo Should this method be deprecated in favor of one name init()? This
* might make the code more readable in implementing modules.
*
* @see FacetapiAdapter::initActiveFilters()
* @see FacetapiFacetManager::initActiveFilters()
*/
public function alterQuery(&$query);
/**
* Returns enabled facets for the searcher associated with this adapter.
* Returns enabled facets for the searcher associated with this FacetManager.
*
* @return array
* An array of enabled facets.
......@@ -119,7 +119,7 @@ interface AdapterInterface {
*
* Facets are built via FacetapiFacetProcessor objects. Facets only need to be
* processed, or built, once regardless of how many realms they are rendered
* in. The FacetapiAdapter::processed semaphore is set when this method is
* in. The FacetapiFacetManager::processed semaphore is set when this method is
* called ensuring that facets are built only once regardless of how many
* times this method is called.
*
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains Drupal\facetapi\Plugin\Adapter\AdapterBase.
* Contains Drupal\facetapi\Plugin\FacetManager\FacetManagerBase.
*/
namespace Drupal\facetapi\Adapter;
namespace Drupal\facetapi\FacetManager;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
......@@ -21,17 +21,17 @@ use Drupal\Component\Plugin\PluginManagerInterface;
use \Drupal\facetapi\Entity\Facet;
/**
* Base class for Facet API adapters.
* Base class for Facet API FacetManagers.
*
* @TODO: rewrite D7 comment block:
* Adapters are responsible for abstracting interactions with the Search backend
* that are necessary for faceted search. The adapter is also responsible for
* FacetManagers are responsible for abstracting interactions with the Search backend
* that are necessary for faceted search. The FacetManager is also responsible for
* retrieving facet information passed by the user via the a processor plugin
* taking the appropriate action, whether it is checking dependencies for all
* enabled facets or passing the appropriate query type plugin to the backend
* so that it can execute the actual facet query.
*/
abstract class AdapterPluginBase extends PluginBase implements AdapterInterface, ContainerFactoryPluginInterface {
abstract class FacetManagerPluginBase extends PluginBase implements FacetManagerInterface, ContainerFactoryPluginInterface {
/**
* The plugin manager.
......@@ -68,7 +68,7 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
/**
* @TODO: generalize to ProcessorInterface and properly type hint in __construct().
* The url processor plugin associated with this adapter.
* The url processor plugin associated with this FacetManager.
*
* @var UrlProcessorInterface
*/
......@@ -77,12 +77,12 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
/**
* A boolean flagging whether the facets have been processed, or built.
*
* This variable acts as a per-adapter semaphore that ensures facet data is
* This variable acts as a per-FacetManager semaphore that ensures facet data is
* processed only once.
*
* @var boolean
*
* @see FacetapiAdapter::processFacets()
* @see FacetapiFacetManager::processFacets()
*/
protected $processed = FALSE;
......@@ -98,7 +98,7 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
*
* @var array
*
* @see FacetapiAdapter::getFacetSettings()
* @see FacetapiFacetManager::getFacetSettings()
*/
protected $settings = array();
......@@ -249,7 +249,7 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
*
* This method is called by the implementing module to initialize the facet
* display process. The following actions are taken:
* - FacetapiAdapter::initActiveFilters() hook is invoked.
* - FacetapiFacetManager::initActiveFilters() hook is invoked.
* - Dependency plugins are instantiated and executed.
* - Query type plugins are executed.
*
......@@ -259,7 +259,7 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
* @todo Should this method be deprecated in favor of one name init()? This
* might make the code more readable in implementing modules.
*
* @see FacetapiAdapter::initActiveFilters()
* @see FacetapiFacetManager::initActiveFilters()
*/
public function alterQuery(&$query) {
/** @var Facet[] $facets */
......@@ -279,18 +279,18 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
}
/**
* Returns enabled facets for the searcher associated with this adapter.
* Returns enabled facets for the searcher associated with this FacetManager.
*
* @return Facet[]
* An array of enabled facets.
*/
public function getEnabledFacets() {
// Get the enabled facets.
// @Todo: inject the entitymanager in the adapter and use that.
// @Todo: inject the entitymanager in the FacetManager and use that.
/** @var Facet[] $facets */
$facets = facetapi_get_enabled_facets();
// Maybe also add different discovery methods later,
// for instance in the adapter itself.
// for instance in the FacetManager itself.
return $facets;
}
......@@ -307,7 +307,7 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
*
* Facets are built via FacetapiFacetProcessor objects. Facets only need to be
* processed, or built, once regardless of how many realms they are rendered
* in. The FacetapiAdapter::processed semaphore is set when this method is
* in. The FacetapiFacetManager::processed semaphore is set when this method is
* called ensuring that facets are built only once regardless of how many
* times this method is called.
*
......@@ -349,14 +349,14 @@ abstract class AdapterPluginBase extends PluginBase implements AdapterInterface,
*/
public function build(FacetInterface $facet) {
// It might be that the facet received here,
// is not the same as the already loaded facets in the adapter.
// is not the same as the already loaded facets in the FacetManager.
// For that reason, get the facet from the already loaded facets
// in the adapter.
// in the FacetManager.
// If this is omitted, building will fail.
$facet = $this->facets[$facet->id()];
// Process the facets.
// @TODO: inject the searcher id on create of the adapter.
// @TODO: inject the searcher id on create of the FacetManager.
$this->searcher_id = $facet->getFacetSource();
// For clarity, process facets is called each build.
......
<?php
/**
* Contains Drupal\facetapi\FacetManager\FacetManagerPluginManager
*/
namespace Drupal\facetapi\FacetManager;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
class FacetManagerPluginManager extends DefaultPluginManager implements FacetManagerPluginManagerInterface {
/**
* @var \Drupal\facetapi\FacetManager\FacetManagerInterface[]
*/
protected $facet_managers = [];
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/facetapi/facet_manager', $namespaces, $module_handler, 'Drupal\facetapi\FacetManager\FacetManagerInterface', 'Drupal\facetapi\Annotation\FacetApiFacetManager');
$this->alterInfo('facetapi_facet_manager_info');
$this->setCacheBackend($cache_backend, 'facetapi_facet_manager_plugins');
}
public function getMyOwnChangeLaterInstance($plugin_id, $search_id) {
if (isset($this->facet_managers[$search_id])) {
return $this->facet_managers[$search_id];
}
/** @var FacetManagerInterface $facet_manager */
$facet_manager = $this->createInstance($plugin_id, array());
$facet_manager->setSearchId($search_id);
$this->facet_managers[$search_id] = $facet_manager;
return $facet_manager;
}
}
<?php
/**
* @file Contains Drupal\facetapi\Adapter\AdapterPluginManagerInterface
* @file Contains Drupal\facetapi\FacetManager\FacetManagerPluginManagerInterface
*/
namespace Drupal\facetapi\Adapter;
namespace Drupal\facetapi\FacetManager;
use Drupal\Component\Plugin\PluginManagerInterface;
interface AdapterPluginManagerInterface extends PluginManagerInterface {
interface FacetManagerPluginManagerInterface extends PluginManagerInterface {
/**
* Get an instance based on search id.
......
......@@ -30,16 +30,16 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class FacetBlock extends BlockBase implements ContainerFactoryPluginInterface {
/**
* Drupal\facetapi\Adapter definition.
* Drupal\facetapi\FacetManager definition.
*
* @var \Drupal\facetapi\Adapter\AdapterInterface
* @var \Drupal\facetapi\FacetManager\FacetManagerInterface
*/
protected $facetapiAdapter;
protected $facetapiFacetManager;
/**
* The adapter plugin manager.
* The facet_manager plugin manager.
*
* @var \Drupal\facetapi\Adapter\AdapterPluginManagerInterface
* @var \Drupal\facetapi\FacetManager\FacetManagerPluginManagerInterface
*/
protected $pluginManager;
......@@ -52,9 +52,9 @@ class FacetBlock extends BlockBase implements ContainerFactoryPluginInterface {
* The plugin_id for the plugin instance.
* @param string $plugin_definition
* The plugin implementation definition.
* @param \Drupal\facetapi\Adapter\AdapterPluginManagerInterface pluginManager
* @param \Drupal\facetapi\FacetManager\FacetManagerPluginManagerInterface pluginManager
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, \Drupal\facetapi\Adapter\AdapterPluginManagerInterface $plugin_manager) {
public function __construct(array $configuration, $plugin_id, $plugin_definition, \Drupal\facetapi\FacetManager\FacetManagerPluginManagerInterface $plugin_manager) {
$this->pluginManager = $plugin_manager;
parent::__construct($configuration, $plugin_id, $plugin_definition);
}
......@@ -63,7 +63,7 @@ class FacetBlock extends BlockBase implements ContainerFactoryPluginInterface {
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$plugin_manager = $container->get('plugin.manager.facetapi.adapter');
$plugin_manager = $container->get('plugin.manager.facetapi.manager');
return new static(
$configuration,
$plugin_id,
......@@ -86,14 +86,14 @@ class FacetBlock extends BlockBase implements ContainerFactoryPluginInterface {
// This should be changeable when we support more than just search API.
$plugin_id = 'search_api_views';
/** @var \Drupal\facetapi\Adapter\AdapterInterface $adapter */
$adapter = $this->pluginManager->getMyOwnChangeLaterInstance(
/** @var \Drupal\facetapi\FacetManager\FacetManagerInterface $manager */
$manager = $this->pluginManager->getMyOwnChangeLaterInstance(
$plugin_id,
$facet->getFacetSource()
);
// Let the adapter build the facets.
$build = $adapter->build($facet);
// Let the facet_manager build the facets.
$build = $manager->build($facet);
return $build;
}
......
<?php
/**
* Search api adapter.
* Search api facet_manager.
*/
namespace Drupal\facetapi\Plugin\facetapi\adapter;
namespace Drupal\facetapi\Plugin\facetapi\facet_manager;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\facetapi\Adapter\AdapterPluginBase;
use Drupal\facetapi\FacetManager\FacetManagerPluginBase;
use Drupal\facetapi\FacetInterface;
use Drupal\facetapi\QueryType\QueryTypePluginManager;
use Drupal\facetapi\UrlProcessor\UrlProcessorPluginManager;
......@@ -16,13 +16,13 @@ use Drupal\search_api\Query\ResultSetInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* @FacetApiAdapter(
* @FacetApiFacetManager(
* id = "search_api_views",
* label = @Translation("Search api"),
* description = @Translation("Search api facet api adapter"),
* description = @Translation("Search api facet api facet_manager"),
* )
*/
class SearchApiViewsAdapter extends AdapterPluginBase {
class SearchApiViewsFacetManager extends FacetManagerPluginBase {
/**
* @var \Drupal\search_api\Query\QueryInterface
......@@ -73,7 +73,7 @@ class SearchApiViewsAdapter extends AdapterPluginBase {
}
/**
* Process the facets in this adapter in this adapter for a test only. This
* Process the facets in this facet_manager in this facet_manager for a test only. This
* method should disappear later when facetapi does it.
*/
public function updateResults() {
......
<?php
/**
* @file
* Contains \Drupal\facetapi\Plugin\facetapi\query_type\QueryTypeTerm
*/
namespace Drupal\facetapi\Plugin\facetapi\query_type;
use Drupal\facetapi\FacetManager\FacetManagerInterface;
use \Drupal\facetapi\QueryType\QueryTypePluginBase;
use Drupal\facetapi\Result\Result;
use Drupal\search_api\Query\Query;
/**
* @FacetApiQueryType(
* id = "search_api_term",
* label = @Translation("Search api term"),
* description = @Translation("Search api term"),
* )
*
*/
class QueryTypeTerm extends QueryTypePluginBase {
/**
* Add facet info to the query using the backend native query object.
*
* @return mixed
*/
public function execute() {
/** @var Query $query */
$query = $this->query;
// Alter the query here.
if (! empty($query)) {
$options = &$query->getOptions();
$field_identifier = $this->facet->getFieldIdentifier();
$options['search_api_facets'][$field_identifier] = array(
'field' => $field_identifier,
'limit' => 50,
'operator' => 'and',
'min_count' => 0,
);
// Add the filter to the query if there are active values.
$active_items = $this->facet->getActiveItems();
if (count($active_items)) {
foreach ($active_items as $value) {
$filter = $query->createFilter();
$filter->condition($this->facet->getFieldIdentifier(), $value);
$query->filter($filter);
}
}
}
}
/**
* Build the facet information,
* so it can be rendered.
*
* @return mixed
*/
public function build() {
if (! empty ($this->results)) {
$facet_results = array();
foreach ($this->results as $result) {
if ($result['count']) {
$facet_results[] = new Result(trim($result['filter'], '"'), $result['count']);
}
}
$this->facet->setResults($facet_results);
}
return $this->facet;
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
namespace Drupal\facetapi\QueryType;
use Drupal\facetapi\Adapter\AdapterInterface;
use Drupal\facetapi\FacetManager\FacetManagerInterface;
interface QueryTypeInterface {
......
<?php
/**
* Tests Facet API's Adapter implementation.
* Tests Facet API's FacetManager implementation.
*/
namespace Drupal\facetapi\Tests;
......@@ -9,10 +9,10 @@ use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\simpletest\WebTestBase;
/**
* @coversDefaultClass Drupal\facetapi\Tests\Adapter
* @coversDefaultClass Drupal\facetapi\Tests\FacetManager
* @group facetapi
*/
class AdapterTest extends WebTestBase {
class FacetManagerTest extends WebTestBase {
use StringTranslationTrait;
......
......@@ -14,7 +14,7 @@ use Drupal\facetapi\FacetInterface;
* The url processor takes care of retrieving facet information
* from the url, and also handles the generation of facet links.
*
* A facetapi adapter has one url processor.
* A facetapi facet_manager has one url processor.
*
* @package Drupal\facetapi\UrlProcessor
*/
......
......@@ -4,9 +4,9 @@
* Contains \Drupal\Tests\facetapi\Plugin\Url\FacetUrlProcessorStandardTest.
*/
namespace Drupal\Tests\facetapi\Plugin\Adapter;
namespace Drupal\Tests\facetapi\Plugin\FacetManager;
use Drupal\facetapi\Plugin\Adapter\AdapterBase;
use Drupal\facetapi\FacetManager\FacetManagerPluginBase;
use Drupal\Tests\UnitTestCase;
/**
......@@ -15,7 +15,7 @@ use Drupal\Tests\UnitTestCase;
* @group facetapi
*
*/
class AdapterBaseTest extends UnitTestCase {
class FacetManagerBaseTest extends UnitTestCase {