Skip to content
......@@ -15,7 +15,7 @@ use Drupal\facets\FacetInterface;
interface PreQueryProcessorInterface extends ProcessorInterface {
/**
* Processor runs before the query is executed.
* Runs before the query is executed.
*
* Uses the queryType and the facetSource implementation to make sure the
* alteration to the query was added before the query is executed in the
......
......@@ -28,8 +28,7 @@ class ProcessorPluginBase extends PluginBase implements ProcessorInterface {
/**
* {@inheritdoc}
*/
public function validateConfigurationForm(array $form, FormStateInterface $form_state, FacetInterface $facet) {
}
public function validateConfigurationForm(array $form, FormStateInterface $form_state, FacetInterface $facet) {}
/**
* {@inheritdoc}
......
......@@ -11,7 +11,7 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\facets\FacetInterface;
/**
* A base class for plugins that implements most of the boilerplate.
* A base class for plugins that implements some boilerplate for a widget order.
*/
abstract class WidgetOrderPluginBase extends ProcessorPluginBase implements WidgetOrderProcessorInterface {
......
......@@ -13,7 +13,7 @@ namespace Drupal\facets\Processor;
interface WidgetOrderProcessorInterface extends BuildProcessorInterface {
/**
* Order results and return the new order of results.
* Orders results and return the new order of results.
*
* @param \Drupal\facets\Result\Result[] $results
* An array containing results.
......
......@@ -12,7 +12,7 @@ namespace Drupal\facets\QueryType;
interface QueryTypeInterface {
/**
* Add facet info to the query using the backend native query object.
* Adds facet info to the query using the backend native query object.
*
* @return array
* Returns an array of unfiltered results
......@@ -20,7 +20,7 @@ interface QueryTypeInterface {
public function execute();
/**
* Build the facet information, so it can be rendered.
* Builds the facet information, so it can be rendered.
*/
public function build();
......
......@@ -28,7 +28,7 @@ abstract class QueryTypePluginBase extends PluginBase implements QueryTypeInterf
}
/**
* Holds the backend native query object.
* The backend native query object.
*
* @var \Drupal\search_api\Query\Query $query
*/
......@@ -42,7 +42,7 @@ abstract class QueryTypePluginBase extends PluginBase implements QueryTypeInterf
protected $facet;
/**
* Holds the results for the facet.
* The results for the facet.
*
* @var \Drupal\facets\Result\ResultInterface[]
*/
......
......@@ -45,7 +45,7 @@ class Result implements ResultInterface {
protected $active = FALSE;
/**
* Construct a new instance of the value object.
* Constructs a new result value object.
*
* @param mixed $raw_value
* The raw value.
......
......@@ -15,7 +15,7 @@ use Drupal\Core\Url;
interface ResultInterface {
/**
* Get the raw value as present in the index.
* Returns the raw value as present in the index.
*
* @return string
* The raw value of the result.
......@@ -23,7 +23,7 @@ interface ResultInterface {
public function getRawValue();
/**
* Get the display value as present in the index.
* Returns the display value as present in the index.
*
* @return string
* The formatted value of the result.
......@@ -31,7 +31,7 @@ interface ResultInterface {
public function getDisplayValue();
/**
* Get the count for the result.
* Returns the count for the result.
*
* @return mixed
* The amount of items for the result.
......@@ -39,7 +39,7 @@ interface ResultInterface {
public function getCount();
/**
* Get the url.
* Returns the url.
*
* @return \Drupal\Core\Url
* The url of the search page with the facet url appended.
......@@ -47,7 +47,7 @@ interface ResultInterface {
public function getUrl();
/**
* Set the url.
* Sets the url.
*
* @param \Drupal\Core\Url $url
* The url of the search page with the facet url appended.
......@@ -55,7 +55,7 @@ interface ResultInterface {
public function setUrl(Url $url);
/**
* Indicate that the value is active (selected).
* Indicates that the value is active (selected).
*
* @param bool $active
* A boolean indicating the active state.
......@@ -71,7 +71,7 @@ interface ResultInterface {
public function isActive();
/**
* Override the display value of a result.
* Overrides the display value of a result.
*
* @param string $display_value
* Override display value.
......
......@@ -8,7 +8,6 @@
namespace Drupal\facets\Tests;
use Drupal\search_api\Entity\Index;
use Drupal\search_api\Utility;
/**
* Contains helpers to create data that can be used by tests.
......@@ -39,42 +38,42 @@ trait ExampleContentTrait {
$entity_test_storage = \Drupal::entityTypeManager()
->getStorage('entity_test');
$this->entities[1] = $entity_test_storage->create(array(
'name' => 'foo bar baz',
'body' => 'test test',
'type' => 'item',
'keywords' => array('orange'),
'category' => 'item_category'
));
'name' => 'foo bar baz',
'body' => 'test test',
'type' => 'item',
'keywords' => array('orange'),
'category' => 'item_category',
));
$this->entities[1]->save();
$this->entities[2] = $entity_test_storage->create(array(
'name' => 'foo test',
'body' => 'bar test',
'type' => 'item',
'keywords' => array('orange', 'apple', 'grape'),
'category' => 'item_category'
));
'name' => 'foo test',
'body' => 'bar test',
'type' => 'item',
'keywords' => array('orange', 'apple', 'grape'),
'category' => 'item_category',
));
$this->entities[2]->save();
$this->entities[3] = $entity_test_storage->create(array(
'name' => 'bar',
'body' => 'test foobar',
'type' => 'item',
));
'name' => 'bar',
'body' => 'test foobar',
'type' => 'item',
));
$this->entities[3]->save();
$this->entities[4] = $entity_test_storage->create(array(
'name' => 'foo baz',
'body' => 'test test test',
'type' => 'article',
'keywords' => array('apple', 'strawberry', 'grape'),
'category' => 'article_category'
));
'name' => 'foo baz',
'body' => 'test test test',
'type' => 'article',
'keywords' => array('apple', 'strawberry', 'grape'),
'category' => 'article_category',
));
$this->entities[4]->save();
$this->entities[5] = $entity_test_storage->create(array(
'name' => 'bar baz',
'body' => 'foo',
'type' => 'article',
'keywords' => array('orange', 'strawberry', 'grape', 'banana'),
'category' => 'article_category'
));
'name' => 'bar baz',
'body' => 'foo',
'type' => 'article',
'keywords' => array('orange', 'strawberry', 'grape', 'banana'),
'category' => 'article_category',
));
$this->entities[5]->save();
$count = \Drupal::entityQuery('entity_test')->count()->execute() - $count;
$this->assertEqual($count, 5, "$count items inserted.");
......@@ -95,33 +94,4 @@ trait ExampleContentTrait {
return $index->indexItems();
}
/**
* Returns the internal field ID for the given entity field name.
*
* @param string $field_name
* The field name.
*
* @return string
* The internal field ID.
*/
protected function getFieldId($field_name) {
return Utility::createCombinedId('entity:entity_test', $field_name);
}
/**
* Returns the item IDs for the given entity IDs.
*
* @param array $entity_ids
* An array of entity IDs.
*
* @return string[]
* An array of item IDs.
*/
protected function getItemIds(array $entity_ids) {
$translate_ids = function ($entity_id) {
return Utility::createCombinedId('entity:entity_test', $entity_id . ':en');
};
return array_map($translate_ids, $entity_ids);
}
}
......@@ -29,7 +29,7 @@ class FacetSourceTest extends FacetWebTestBase {
];
/**
* Test the facet source editing.
* Tests the facet source editing.
*/
public function testEditFilterKey() {
// Make sure we're logged in with a user that has sufficient permissions.
......@@ -42,16 +42,16 @@ class FacetSourceTest extends FacetWebTestBase {
// Test the edit page.
$edit = array(
'filterKey' => 'fq',
'filter_key' => 'fq',
);
$this->assertField('filterKey');
$this->assertField('urlProcessor');
$this->assertField('filter_key');
$this->assertField('url_processor');
$this->drupalPostForm(NULL, $edit, $this->t('Save'));
$this->assertResponse(200);
// Test that saving worked filterkey has the new value
$this->assertField('filterKey');
$this->assertField('urlProcessor');
// Test that saving worked filter_key has the new value.
$this->assertField('filter_key');
$this->assertField('url_processor');
$this->assertRaw('fq');
}
......@@ -69,17 +69,17 @@ class FacetSourceTest extends FacetWebTestBase {
// Test the edit page.
$edit = array(
'urlProcessor' => 'dummy_query',
'url_processor' => 'dummy_query',
);
$this->assertField('filterKey');
$this->assertField('urlProcessor');
$this->assertField('filter_key');
$this->assertField('url_processor');
$this->drupalPostForm(NULL, $edit, $this->t('Save'));
$this->assertResponse(200);
// Test that saving worked and that the url processor has the new value.
$this->assertField('filterKey');
$this->assertField('urlProcessor');
$elements = $this->xpath('//input[@id=:id]', [':id' => 'edit-urlprocessor-dummy-query']);
$this->assertField('filter_key');
$this->assertField('url_processor');
$elements = $this->xpath('//input[@id=:id]', [':id' => 'edit-url-processor-dummy-query']);
$this->assertEqual('dummy_query', $elements[0]['value']);
}
......
......@@ -71,9 +71,10 @@ class IntegrationTest extends FacetWebTestBase {
// Check if the overview is empty.
$this->checkEmptyOverview();
// Add a new facet and edit it.
// Add a new facet and edit it. Check adding a duplicate.
$this->addFacet($facet_name);
$this->editFacet($facet_name);
$this->addFacetDuplicate($facet_name);
// By default, the view should show all entities.
$this->drupalGet('search-api-test-fulltext');
......@@ -326,6 +327,166 @@ class IntegrationTest extends FacetWebTestBase {
$this->assertLink('article');
}
/**
* Tests that we disallow unwanted values.
*/
public function testUnwantedValues() {
// Go to the Add facet page and make sure that returns a 200.
$facet_add_page = '/admin/config/search/facets/add-facet';
$this->drupalGet($facet_add_page);
$this->assertResponse(200);
// Configure the facet source by selecting one of the search api views.
$this->drupalGet($facet_add_page);
$this->drupalPostForm(NULL, ['facet_source_id' => 'search_api_views:search_api_test_view:page_1'], $this->t('Configure facet source'));
// Fill in all fields and make sure the 'field is required' message is no
// longer shown.
$facet_source_form = [
'facet_source_id' => 'search_api_views:search_api_test_view:page_1',
'facet_source_configs[search_api_views:search_api_test_view:page_1][field_identifier]' => 'type',
];
$this->drupalPostForm(NULL, $facet_source_form, $this->t('Save'));
$form_values = [
'name' => 'name 1',
'id' => 'name 1',
'status' => 1,
'url_alias' => 'name',
];
$this->drupalPostForm(NULL, $form_values, $this->t('Save'));
$this->assertText($this->t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
$form_values = [
'name' => 'name 1',
'id' => 'name:&1',
'status' => 1,
'url_alias' => 'name',
];
$this->drupalPostForm(NULL, $form_values, $this->t('Save'));
$this->assertText($this->t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
$form_values = [
'name' => 'name 1',
'id' => 'name_1',
'status' => 1,
'url_alias' => 'name:1',
];
$this->drupalPostForm(NULL, $form_values, $this->t('Save'));
$this->assertText($this->t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
$form_values = [
'name' => 'name 1',
'id' => 'name_1',
'status' => 1,
'url_alias' => 'name_1',
];
$this->drupalPostForm(NULL, $form_values, $this->t('Save'));
$this->assertNoText($this->t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
}
/**
* Tests for processor integration.
*/
public function testProcessorIntegration() {
$facet_name = "Snowy owl~";
$facet_id = "snowy_owl_";
$this->addFacet($facet_name);
// Go to the processors form and check that the count limit processor is not
// checked.
$this->drupalGet('admin/config/search/facets/' . $facet_id . '/display');
$this->assertNoFieldChecked('edit-facet-settings-count-limit-status');
$form = ['facet_settings[count_limit][status]' => TRUE];
$this->drupalPostForm(NULL, $form, $this->t('Save'));
$this->assertResponse(200);
$this->assertFieldChecked('edit-facet-settings-count-limit-status');
// Enable the sort processor and change sort direction.
// Test that the sort settings change persisted.
$form = [
'facet_sorting[active_widget_order][status]' => TRUE,
'facet_sorting[active_widget_order][settings][sort]' => 'DESC',
];
$this->drupalPostForm(NULL, $form, $this->t('Save'));
$this->assertResponse(200);
$this->assertFieldChecked('edit-facet-sorting-active-widget-order-status');
$this->assertFieldChecked('edit-facet-sorting-active-widget-order-settings-sort-desc');
// Add an extra processor so we can test the weights as well.
$form = [
'facet_settings[hide_non_narrowing_result_processor][status]' => TRUE,
'facet_settings[count_limit][status]' => TRUE,
];
$this->drupalPostForm(NULL, $form, $this->t('Save'));
$this->assertResponse(200);
$this->assertFieldChecked('edit-facet-settings-count-limit-status');
$this->assertFieldChecked('edit-facet-settings-hide-non-narrowing-result-processor-status');
$this->assertOptionSelected('edit-processors-count-limit-weights-build', -10);
$this->assertOptionSelected('edit-processors-hide-non-narrowing-result-processor-weights-build', -10);
// Change the weight of one of the processors and test that the weight
// change persisted.
$form = [
'facet_settings[hide_non_narrowing_result_processor][status]' => TRUE,
'facet_settings[count_limit][status]' => TRUE,
'processors[hide_non_narrowing_result_processor][weights][build]' => 5,
];
$this->drupalPostForm(NULL, $form, $this->t('Save'));
$this->assertFieldChecked('edit-facet-settings-count-limit-status');
$this->assertFieldChecked('edit-facet-settings-hide-non-narrowing-result-processor-status');
$this->assertOptionSelected('edit-processors-count-limit-weights-build', -10);
$this->assertOptionSelected('edit-processors-hide-non-narrowing-result-processor-weights-build', 5);
}
/**
* Tests the facet's exclude functionality.
*/
public function testExcludeFacet() {
$facet_name = 'test & facet';
$facet_id = 'test_facet';
$facet_edit_page = 'admin/config/search/facets/' . $facet_id . '/display';
$this->addFacet($facet_name);
$this->createFacetBlock($facet_id);
$this->drupalGet($facet_edit_page);
$this->assertNoFieldChecked('edit-facet-settings-exclude');
$this->drupalPostForm(NULL, ['facet_settings[exclude]' => TRUE], $this->t('Save'));
$this->assertResponse(200);
$this->assertFieldChecked('edit-facet-settings-exclude');
$this->drupalGet('search-api-test-fulltext');
$this->assertText('foo bar baz');
$this->assertText('foo baz');
$this->assertLink('item');
$this->clickLink('item');
$this->assertLink('(-) item');
$this->assertText('foo baz');
$this->assertText('bar baz');
$this->assertNoText('foo bar baz');
$this->drupalGet($facet_edit_page);
$this->drupalPostForm(NULL, ['facet_settings[exclude]' => FALSE], $this->t('Save'));
$this->assertResponse(200);
$this->assertNoFieldChecked('edit-facet-settings-exclude');
$this->drupalGet('search-api-test-fulltext');
$this->assertText('foo bar baz');
$this->assertText('foo baz');
$this->assertLink('item');
$this->clickLink('item');
$this->assertLink('(-) item');
$this->assertText('foo bar baz');
$this->assertText('foo test');
$this->assertText('bar');
$this->assertNoText('foo baz');
}
/**
* Deletes a facet block by id.
*
......@@ -340,7 +501,7 @@ class IntegrationTest extends FacetWebTestBase {
}
/**
* Helper function: asserts that a facet block does not appear.
* Asserts that a facet block does not appear.
*/
protected function assertNoFacetBlocksAppear() {
foreach ($this->blocks as $block) {
......@@ -349,7 +510,7 @@ class IntegrationTest extends FacetWebTestBase {
}
/**
* Helper function: asserts that a facet block appears.
* Asserts that a facet block appears.
*/
protected function assertFacetBlocksAppear() {
foreach ($this->blocks as $block) {
......@@ -420,7 +581,7 @@ class IntegrationTest extends FacetWebTestBase {
}
/**
* Get the facet overview page and make sure the overview is empty.
* Tests that the facet overview is empty.
*/
protected function checkEmptyOverview() {
$facet_overview = '/admin/config/search/facets';
......@@ -488,13 +649,47 @@ class IntegrationTest extends FacetWebTestBase {
$this->drupalGet('admin/config/search/facets');
}
/**
* Tests creating a facet with an existing machine name.
*
* @param string $facet_name
* The name of the facet.
*/
protected function addFacetDuplicate($facet_name, $facet_type = 'type') {
$facet_id = $this->convertNameToMachineName($facet_name);
$facet_add_page = '/admin/config/search/facets/add-facet';
$this->drupalGet($facet_add_page);
$form_values = [
'name' => $facet_name,
'id' => $facet_id,
'url_alias' => $facet_id,
'facet_source_id' => 'search_api_views:search_api_test_view:page_1',
];
$facet_source_configs['facet_source_configs[search_api_views:search_api_test_view:page_1][field_identifier]'] = $facet_type;
// Try to submit a facet with a duplicate machine name after form rebuilding
// via facet source submit.
$this->drupalPostForm(NULL, $form_values, $this->t('Configure facet source'));
$this->drupalPostForm(NULL, $form_values + $facet_source_configs, $this->t('Save'));
$this->assertText($this->t('The machine-readable name is already in use. It must be unique.'));
// Try to submit a facet with a duplicate machine name after form rebuilding
// via facet source submit using AJAX.
$this->drupalPostAjaxForm(NULL, $form_values, array('facet_source_configure' => t('Configure facet source')));
$this->drupalPostForm(NULL, $form_values + $facet_source_configs, $this->t('Save'));
$this->assertText($this->t('The machine-readable name is already in use. It must be unique.'));
}
/**
* Tests editing of a facet through the UI.
*
* @param string $facet_name
* The name of the facet.
*/
public function editFacet($facet_name) {
protected function editFacet($facet_name) {
$facet_id = $this->convertNameToMachineName($facet_name);
$facet_edit_page = '/admin/config/search/facets/' . $facet_id . '/edit';
......@@ -526,7 +721,7 @@ class IntegrationTest extends FacetWebTestBase {
}
/**
* This deletes an unused facet through the UI.
* Deletes a facet through the UI that still has usages.
*
* @param string $facet_name
* The name of the facet.
......@@ -547,7 +742,7 @@ class IntegrationTest extends FacetWebTestBase {
}
/**
* This deletes a facet through the UI.
* Deletes a facet through the UI.
*
* @param string $facet_name
* The name of the facet.
......
......@@ -73,7 +73,7 @@ class UrlIntegrationTest extends FacetWebTestBase {
'settings' => [
'region' => 'footer',
'id' => str_replace('_', '-', $id),
]
],
];
$this->drupalPlaceBlock($block_values['plugin_id'], $block_values['settings']);
......@@ -95,8 +95,8 @@ class UrlIntegrationTest extends FacetWebTestBase {
$this->clickLink($this->t('Configure'));
$edit = [
'filterKey' => 'y',
'urlProcessor' => 'query_string',
'filter_key' => 'y',
'url_processor' => 'query_string',
];
$this->drupalPostForm(NULL, $edit, $this->t('Save'));
......@@ -118,8 +118,8 @@ class UrlIntegrationTest extends FacetWebTestBase {
$this->clickLink($this->t('Configure'));
$edit = [
'filterKey' => 'y',
'urlProcessor' => 'dummy_query',
'filter_key' => 'y',
'url_processor' => 'dummy_query',
];
$this->drupalPostForm(NULL, $edit, $this->t('Save'));
......
......@@ -20,15 +20,6 @@ abstract class WebTestBase extends SimpletestWebTestBase {
use StringTranslationTrait;
use ExampleContentTrait;
/**
* Exempt from strict schema checking.
*
* @see \Drupal\Core\Config\Testing\ConfigSchemaChecker
*
* @var bool
*/
protected $strictConfigSchema = FALSE;
/**
* Modules to enable for this test.
*
......
......@@ -70,7 +70,7 @@ class WidgetIntegrationTest extends FacetWebTestBase {
'settings' => [
'region' => 'footer',
'id' => str_replace('_', '-', $id),
]
],
];
$this->drupalPlaceBlock($block_values['plugin_id'], $block_values['settings']);
......@@ -80,7 +80,7 @@ class WidgetIntegrationTest extends FacetWebTestBase {
}
/**
* Test links widget's basic functionality.
* Tests links widget's basic functionality.
*/
public function testLinksWidget() {
$id = 'links_widget';
......@@ -106,7 +106,7 @@ class WidgetIntegrationTest extends FacetWebTestBase {
'settings' => [
'region' => 'footer',
'id' => str_replace('_', '-', $id),
]
],
];
$this->drupalPlaceBlock($block_values['plugin_id'], $block_values['settings']);
......@@ -146,7 +146,7 @@ class WidgetIntegrationTest extends FacetWebTestBase {
'settings' => [
'region' => 'footer',
'id' => str_replace('_', '-', $id),
]
],
];
$this->drupalPlaceBlock($block_values['plugin_id'], $block_values['settings']);
......@@ -159,7 +159,7 @@ class WidgetIntegrationTest extends FacetWebTestBase {
$this->drupalGet($facet_edit_page);
$this->drupalPostForm(NULL, ['widget' => 'links', 'widget_configs[show_numbers]' => TRUE], $this->t('Save'));
// Go back to the same view and check that links now display the count
// Go back to the same view and check that links now display the count.
$this->drupalGet('search-api-test-fulltext');
$this->assertLink('item (3)');
$this->assertLink('article (2)');
......
......@@ -42,6 +42,7 @@ interface UrlProcessorInterface {
* remembered when building the facet's urls.
*
* @param \Drupal\facets\FacetInterface $facet
* The facet that is edited.
*/
public function setActiveItems(FacetInterface $facet);
......
......@@ -14,7 +14,7 @@ use Drupal\facets\FacetInterface;
interface WidgetInterface {
/**
* Add facet info to the query using the selected query type.
* Adds facet info to the query using the selected query type.
*
* @return mixed
* A boolean
......@@ -33,7 +33,7 @@ interface WidgetInterface {
public function build(FacetInterface $facet);
/**
* Pick the preferred query type for this widget.
* Picks the preferred query type for this widget.
*
* @param string[] $query_types
* An array keyed with query type name and it's plugin class to load.
......
......@@ -33,7 +33,7 @@ class DummyQuery extends UrlProcessorPluginBase {
*
* @var string
*/
protected $url_alias;
protected $urlAlias;
/**
* An array of active filters.
......@@ -60,7 +60,7 @@ class DummyQuery extends UrlProcessorPluginBase {
$get_params = $this->request->query;
// Set the url alias from the the facet object.
$this->url_alias = $facet->getUrlAlias();
$this->urlAlias = $facet->getUrlAlias();
// No results are found for this facet, so don't try to create urls.
if (empty($results)) {
......@@ -69,7 +69,7 @@ class DummyQuery extends UrlProcessorPluginBase {
/** @var \Drupal\facets\Result\ResultInterface $result */
foreach ($results as &$result) {
$filter_string = $this->url_alias . self::SEPARATOR . $result->getRawValue();
$filter_string = $this->urlAlias . self::SEPARATOR . $result->getRawValue();
$result_get_params = clone $get_params;
$filter_params = $result_get_params->get($this->filterKey, [], TRUE);
......@@ -105,18 +105,18 @@ class DummyQuery extends UrlProcessorPluginBase {
*/
public function setActiveItems(FacetInterface $facet) {
// Set the url alias from the the facet object.
$this->url_alias = $facet->getUrlAlias();
$this->urlAlias = $facet->getUrlAlias();
// Get the filter key of the facet.
if (isset($this->activeFilters[$this->url_alias])) {
foreach ($this->activeFilters[$this->url_alias] as $value) {
if (isset($this->activeFilters[$this->urlAlias])) {
foreach ($this->activeFilters[$this->urlAlias] as $value) {
$facet->setActiveItem(trim($value, '"'));
}
}
}
/**
* Initialize the active filters.
* Initializes the active filters.
*
* Get all the filters that are active. This method only get's all the
* filters but doesn't assign them to facets. In the processFacet method the
......
......@@ -19,8 +19,8 @@ display:
query:
type: search_api_query
options:
search_api_bypass_access: false
entity_access: false
bypass_access: true
skip_access: true
parse_mode: terms
exposed_form:
type: basic
......
......@@ -87,7 +87,8 @@ class FacetSourcePluginManagerTest extends UnitTestCase {
*/
public function testConstruct() {
$namespaces = new ArrayObject();
$this->sut = new FacetSourcePluginManager($namespaces, $this->cache, $this->moduleHandler);
$sut = new FacetSourcePluginManager($namespaces, $this->cache, $this->moduleHandler);
$this->assertInstanceOf('\Drupal\facets\FacetSource\FacetSourcePluginManager', $sut);
}
/**
......
......@@ -186,4 +186,5 @@ class OtherFacetTest extends UnitTestCase {
$evaluation = $sut->evaluate();
$this->assertFalse($evaluation);
}
}