Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • project/facets
  • issue/facets-3182762
  • issue/facets-2937191
  • issue/facets-3073444
  • issue/facets-3187388
  • issue/facets-3189343
  • issue/facets-3190076
  • issue/facets-3190111
  • issue/facets-3190240
  • issue/facets-3057943
  • issue/facets-3153889
  • issue/facets-3015387
  • issue/facets-3197615
  • issue/facets-3199135
  • issue/facets-3199156
  • issue/facets-3200659
  • issue/facets-3204072
  • issue/facets-3205381
  • issue/facets-3162984
  • issue/facets-3208580
  • issue/facets-3211155
  • issue/facets-3168241
  • issue/facets-3058314
  • issue/facets-3214662
  • issue/facets-3212932
  • issue/facets-2979223
  • issue/facets-3213733
  • issue/facets-3216756
  • issue/facets-3221545
  • issue/facets-3223956
  • issue/facets-3052574
  • issue/facets-3173865
  • issue/facets-3231934
  • issue/facets-3226284
  • issue/facets-3100620
  • issue/facets-3283166
  • issue/facets-3281408
  • issue/facets-3225189
  • issue/facets-3153622
  • issue/facets-3186953
  • issue/facets-3248297
  • issue/facets-3220140
  • issue/facets-3252806
  • issue/facets-3046872
  • issue/facets-3254732
  • issue/facets-3255454
  • issue/facets-3255596
  • issue/facets-3256305
  • issue/facets-3256222
  • issue/facets-3257441
  • issue/facets-3257445
  • issue/facets-3173972
  • issue/facets-3259958
  • issue/facets-3261140
  • issue/facets-3262863
  • issue/facets-3264045
  • issue/facets-3264196
  • issue/facets-3264284
  • issue/facets-3265768
  • issue/facets-2939710
  • issue/facets-3031544
  • issue/facets-3266265
  • issue/facets-3047910
  • issue/facets-2908937
  • issue/facets-3270514
  • issue/facets-3008061
  • issue/facets-3272851
  • issue/facets-2993101
  • issue/facets-3273431
  • issue/facets-3190289
  • issue/facets-2937619
  • issue/facets-3285728
  • issue/facets-3106111
  • issue/facets-3291943
  • issue/facets-3260603
  • issue/facets-3293266
  • issue/facets-3294991
  • issue/facets-3296120
  • issue/facets-2873480
  • issue/facets-3298956
  • issue/facets-3299603
  • issue/facets-3111903
  • issue/facets-3300227
  • issue/facets-3303927
  • issue/facets-3116236
  • issue/facets-3297168
  • issue/facets-3301075
  • issue/facets-3295536
  • issue/facets-3303305
  • issue/facets-3305120
  • issue/facets-2837729
  • issue/facets-3310812
  • issue/facets-3310894
  • issue/facets-3306634
  • issue/facets-3307082
  • issue/facets-3307968
  • issue/facets-3308371
  • issue/facets-3309309
  • issue/facets-3310848
  • issue/facets-3310857
  • issue/facets-3311242
  • issue/facets-3311500
  • issue/facets-3311856
  • issue/facets-3251920
  • issue/facets-3317585
  • issue/facets-3317783
  • issue/facets-2978248
  • issue/facets-3314702
  • issue/facets-3318667
  • issue/facets-3326080
  • issue/facets-3326809
  • issue/facets-3327596
  • issue/facets-3320629
  • issue/facets-3327246
  • issue/facets-3327613
  • issue/facets-3327629
  • issue/facets-3172373
  • issue/facets-3327604
  • issue/facets-3327592
  • issue/facets-3323372
  • issue/facets-3336646
  • issue/facets-3343860
  • issue/facets-3331219
  • issue/facets-3260155
  • issue/facets-3206427
  • issue/facets-3342656
  • issue/facets-3349266
  • issue/facets-3352687
  • issue/facets-3355614
  • issue/facets-3318636
  • issue/facets-3332128
  • issue/facets-3356573
  • issue/facets-2986981
  • issue/facets-2984641
  • issue/facets-3350613
  • issue/facets-3360010
  • issue/facets-3360426
  • issue/facets-3365579
  • issue/facets-3367124
  • issue/facets-3368253
  • issue/facets-3368327
  • issue/facets-3133309
  • issue/facets-3360920
  • issue/facets-3395766
  • issue/facets-3402720
  • issue/facets-3404340
  • issue/facets-3211200
  • issue/facets-3374554
  • issue/facets-3385696
  • issue/facets-2997417
  • issue/facets-3387254
  • issue/facets-3386518
  • issue/facets-3117495
  • issue/facets-3390004
  • issue/facets-3387250
  • issue/facets-3390365
  • issue/facets-3391052
  • issue/facets-3391322
  • issue/facets-3391614
  • issue/facets-3394866
  • issue/facets-3214153
  • issue/facets-3408085
  • issue/facets-3395567
  • issue/facets-3313850
  • issue/facets-3410049
  • issue/facets-3420142
  • issue/facets-3373338
  • issue/facets-3412573
  • issue/facets-3413405
  • issue/facets-3414606
  • issue/facets-3415552
  • issue/facets-3416017
  • issue/facets-3415900
  • issue/facets-3258992
  • issue/facets-3408001
  • issue/facets-3254496
  • issue/facets-3254497
  • issue/facets-3421560
  • issue/facets-3422013
  • issue/facets-3419501
  • issue/facets-3364560
  • issue/facets-3423195
  • issue/facets-3276669
  • issue/facets-3425883
  • issue/facets-3426667
  • issue/facets-3426673
  • issue/facets-3426675
  • issue/facets-3427300
  • issue/facets-3427383
  • issue/facets-3112463
  • issue/facets-3428646
  • issue/facets-3446053
  • issue/facets-3444352
  • issue/facets-3436160
  • issue/facets-3440551
  • issue/facets-3430401
  • issue/facets-3285575
  • issue/facets-3446781
  • issue/facets-3436010
  • issue/facets-3326234
  • issue/facets-3365166
  • issue/facets-3431226
  • issue/facets-3437814
  • issue/facets-3446211
  • issue/facets-3432718
  • issue/facets-3390386
  • issue/facets-3438980
  • issue/facets-3259123
  • issue/facets-3447859
  • issue/facets-3447884
  • issue/facets-3449029
  • issue/facets-3449596
  • issue/facets-3451106
  • issue/facets-3451557
  • issue/facets-3452863
  • issue/facets-3008561
  • issue/facets-3406085
  • issue/facets-3283106
  • issue/facets-3455217
  • issue/facets-3195236
  • issue/facets-3458558
  • issue/facets-3459093
  • issue/facets-3460346
  • issue/facets-3462302
  • issue/facets-3259836
  • issue/facets-3463418
  • issue/facets-3459885
  • issue/facets-3008615
  • issue/facets-3466566
  • issue/facets-2811331
  • issue/facets-3467119
  • issue/facets-3467173
  • issue/facets-3469997
  • issue/facets-2950054
  • issue/facets-3092320
  • issue/facets-3473690
  • issue/facets-3386783
  • issue/facets-3469754
  • issue/facets-3477332
  • issue/facets-3477929
  • issue/facets-3479103
  • issue/facets-3049100
  • issue/facets-3480277
  • issue/facets-3282290
  • issue/facets-3481448
  • issue/facets-3482015
  • issue/facets-3482326
  • issue/facets-3095160
  • issue/facets-3495860
  • issue/facets-3484320
  • issue/facets-3484946
  • issue/facets-3485860
  • issue/facets-3487006
  • issue/facets-3487270
  • issue/facets-3488396
  • issue/facets-3488547
  • issue/facets-3489712
  • issue/facets-3490006
  • issue/facets-3490556
  • issue/facets-3492078
  • issue/facets-3492924
  • issue/facets-3492410
  • issue/facets-3495743
  • issue/facets-3497166
  • issue/facets-3252416
  • issue/facets-3499673
  • issue/facets-3501351
  • issue/facets-3501981
  • issue/facets-3195462
  • issue/facets-3161773
  • issue/facets-3502922
  • issue/facets-3502957
  • issue/facets-3503603
  • issue/facets-3504337
  • issue/facets-3504573
  • issue/facets-3446040
  • issue/facets-3506376
  • issue/facets-3508123
  • issue/facets-3013795
  • issue/facets-3509068
  • issue/facets-3508981
  • issue/facets-3509670
282 results
Show changes
Commits on Source (68)
Showing
with 182 additions and 52 deletions
......@@ -16,7 +16,13 @@
},
"license": "GPL-2.0+",
"require-dev": {
"drupal/search_api": "~1.21"
"drupal/search_api": "^1.25||1.x-dev",
"drupal/jquery_ui_slider": "~1.1",
"drupal/jquery_ui_touch_punch": "~1.0"
},
"suggest": {
"drupal/jquery_ui_slider": "Required for the 'Facets Range Widget' module to work",
"drupal/jquery_ui_touch_punch": "Required for the 'Facets Range Widget' module to work"
},
"conflict": {
"drupal/search_api": "<1.14"
......
......@@ -14,6 +14,12 @@ facets.facet.*:
min_count:
type: integer
label: 'Minimum count'
missing:
type: boolean
label: 'Missing'
missing_label:
type: label
label: 'Missing label'
url_alias:
type: label
label: 'Name of facet as used in the URL'
......
......@@ -93,6 +93,20 @@ plugin.plugin_configuration.facets_processor.boolean_item:
type: label
label: 'Off value'
plugin.plugin_configuration.facets_processor.combine_processor:
type: sequence
label: 'Combine facets processor'
sequence:
type: mapping
label: Mapping for a processor
mapping:
combine:
type: boolean
label: 'Combine this facet'
mode:
type: string
label: 'Combination mode'
plugin.plugin_configuration.facets_processor.dependent_processor:
type: sequence
label: 'Dependent facet processor'
......@@ -113,6 +127,14 @@ plugin.plugin_configuration.facets_processor.dependent_processor:
type: boolean
label: 'Should the condition be negated'
plugin.plugin_configuration.facets_processor.show_siblings_processor:
type: mapping
label: 'Show siblings processor'
mapping:
show_parent_siblings:
type: boolean
label: 'Show parents'
plugin.plugin_configuration.facets_processor.date_item:
type: mapping
label: 'Date item processor'
......@@ -126,6 +148,9 @@ plugin.plugin_configuration.facets_processor.date_item:
date_format:
type: string
label: 'Date format'
hierarchy:
type: boolean
label: 'Hierarchy'
plugin.plugin_configuration.facets_processor.granularity_item:
type: mapping
......@@ -149,3 +174,11 @@ plugin.plugin_configuration.facets_processor.granularity_item:
include_edges:
type: boolean
label: 'Include first lower and last upper bound'
plugin.plugin_configuration.facets_processor.replace:
type: mapping
label: 'Settings for facet replacement processor'
mapping:
replacements:
type: text
label: 'Replacement values'
name: 'Facets'
type: module
description: 'Faceted search interfaces that can be used on Search API searchers.'
core_version_requirement: ^9.2 || ^10.0
core_version_requirement: ^9.3 || ^10.0
package: Search
configure: entity.facets_facet.collection
test_dependencies:
......
......@@ -8,6 +8,7 @@
use Drupal\facets\Entity\Facet;
use Drupal\facets\Entity\FacetSource;
use Drupal\block\Entity\Block;
use Drupal\facets\Plugin\facets\facet_source\SearchApiDisplay;
/**
* Implements hook_update_dependencies().
......@@ -176,6 +177,7 @@ function facets_update_8005() {
function facets_update_8006() {
$query = \Drupal::entityQuery('block')
->condition('plugin', 'facet_block', 'STARTS_WITH')
->accessCheck()
->execute();
foreach ($query as $block_id) {
......@@ -191,10 +193,7 @@ function facets_update_8006() {
* Resave facets for consistent configuration export.
*/
function facets_update_8007() {
$facets = Facet::loadMultiple();
foreach ($facets as $facet) {
$facet->save();
}
// Moved to facets_update_8009().
}
/**
......@@ -209,3 +208,55 @@ function facets_update_8008() {
$facet->save(TRUE);
}
}
/**
* Resave facets for consistent configuration export.
*/
function facets_update_8009() {
// Moved to facets_update_8011().
}
/**
* Enable facet block caching for the views with "Search API tag or time" cache.
*/
function facets_update_8010() {
// Moved to facets_update_8012().
}
/**
* Resave facets for consistent configuration export.
*/
function facets_update_8011() {
$facets = Facet::loadMultiple();
foreach ($facets as $facet) {
$facet->save();
}
}
/**
* Update facet block caching for the views with "Search API tag or time" cache.
*/
function facets_update_8012() {
$facet_storage = \Drupal::entityTypeManager()->getStorage('facets_facet');
$processed_views = [];
/** @var \Drupal\facets\FacetInterface $facet */
foreach ($facet_storage->loadMultiple() as $facet) {
if (
($source = $facet->getFacetSource())
&& $source instanceof SearchApiDisplay
&& ($view_executable = $source->getViewsDisplay())
&& !in_array($view_executable->id(), $processed_views)
&& ($cache_plugin = $view_executable->getDisplay()->getPlugin('cache'))
&& in_array(
$cache_plugin->getPluginId(),
['search_api_tag', 'search_api_time']
)
) {
$view_executable->save();
$processed_views[] = $view_executable->id();
}
}
return !empty($processed_views)
? sprintf('Facet caching was updated for the following views: %s.', implode(', ', $processed_views))
: 'There are no views with search API cache plugins and facets in the same time, so nothing has been updated.';
}
......@@ -5,7 +5,7 @@ drupal.facets.index-active-formatters:
dependencies:
- core/jquery
- core/drupal
- core/jquery.once
- core/once
drupal.facets.edit-facet:
version: VERSION
......@@ -28,7 +28,7 @@ widget:
dependencies:
- core/jquery
- core/drupal
- core/jquery.once
- core/once
drupal.facets.link-widget:
version: VERSION
......@@ -69,7 +69,7 @@ soft-limit:
js/soft-limit.js: {}
dependencies:
- core/jquery
- core/jquery.once
- core/once
- core/drupal
- core/drupalSettings
......
......@@ -10,10 +10,12 @@ use Drupal\Core\Breadcrumb\Breadcrumb;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Link;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Site\Settings;
use Drupal\Core\Url;
use Drupal\facets\Entity\Facet;
use Drupal\facets\Entity\FacetSource;
use Drupal\facets\FacetInterface;
use Drupal\facets\FacetSource\SearchApiFacetSourceInterface;
use Drupal\views\Entity\View;
use Drupal\Core\Entity\EntityInterface;
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
......@@ -202,8 +204,18 @@ function facets_entity_predelete(EntityInterface $entity) {
* @see https://www.drupal.org/node/1842756
*/
function facets_preprocess_facets_item_list(array &$variables) {
if ($variables['facet'] !== NULL && $variables['facet']->get('show_title') === TRUE) {
$variables['title'] = $variables['facet']->label();
/** @var FacetInterface $facet */
$facet = $variables['facet'];
if ($facet !== NULL) {
if ($facet->get('show_title') === TRUE) {
$variables['title'] = $facet->label();
}
if (Settings::get('facets_debug_cacheable_metadata', FALSE) && $facet->getFacetSource() instanceof SearchApiFacetSourceInterface) {
$variables['cache_hash'] = substr(base_convert(hash('sha256', uniqid(time())), 16, 36), 0, 6);
$variables['cache_contexts'] = implode(', ', $facet->getCacheContexts());
$variables['cache_tags'] = implode(', ', $facet->getCacheTags());
$variables['cache_max_age'] = $facet->getCacheMaxAge() . ' seconds';
}
}
template_preprocess_item_list($variables);
}
......
......@@ -3,7 +3,7 @@
* Provides base widget behaviours.
*/
(function ($, Drupal) {
(function ($, Drupal, once) {
'use strict';
......@@ -20,8 +20,7 @@
* filter is executed.
*
* This is an example how to trigger "facets_filter" event for your widget:
* $('.my-custom-widget.js-facets-widget')
* .once('my-custom-widget-on-change')
* $(once('my-custom-widget-on-change', '.my-custom-widget.js-facets-widget'))
* .on('change', function () {
* // In this example $(this).val() will provide needed URL.
* $(this).trigger('facets_filter', [ $(this).val() ]);
......@@ -34,8 +33,7 @@
* event before initial filter request is finished.
*
* This is an example how to handle "facets_filtering":
* $('.my-custom-widget.js-facets-widget')
* .once('my-custom-widget-on-facets-filtering')
* $(once('my-custom-widget-on-facets-filtering', '.my-custom-widget.js-facets-widget'))
* .on('facets_filtering.my_widget_module', function () {
* // Let's say, that widget can be simply disabled (fe. select).
* $(this).prop('disabled', true);
......@@ -47,8 +45,7 @@
*/
Drupal.behaviors.facetsFilter = {
attach: function (context) {
$('.js-facets-widget', context)
.once('js-facet-filter')
$(once('js-facet-filter', '.js-facets-widget', context))
.on('facets_filter.facets', function (event, url) {
$('.js-facets-widget').trigger('facets_filtering');
......@@ -57,4 +54,4 @@
}
};
})(jQuery, Drupal);
})(jQuery, Drupal, once);
......@@ -3,7 +3,7 @@
* Transforms links into checkboxes.
*/
(function ($, Drupal) {
(function ($, Drupal, once) {
'use strict';
......@@ -14,13 +14,25 @@
}
};
window.onbeforeunload = function(e) {
if (Drupal.facets) {
var $checkboxWidgets = $('.js-facets-checkbox-links');
if ($checkboxWidgets.length > 0) {
$checkboxWidgets.each(function (index, widget) {
var $widget = $(widget);
var $widgetLinks = $widget.find('.facet-item > a');
$widgetLinks.each(Drupal.facets.updateCheckbox);
});
}
}
};
/**
* Turns all facet links into checkboxes.
*/
Drupal.facets.makeCheckboxes = function (context) {
// Find all checkbox facet links and give them a checkbox.
var $checkboxWidgets = $('.js-facets-checkbox-links', context)
.once('facets-checkbox-transform');
var $checkboxWidgets = $(once('facets-checkbox-transform', '.js-facets-checkbox-links', context));
if ($checkboxWidgets.length > 0) {
$checkboxWidgets.each(function (index, widget) {
......@@ -79,6 +91,18 @@
};
/**
* Update checkbox active state.
*/
Drupal.facets.updateCheckbox = function () {
var $link = $(this);
var active = $link.hasClass('is-active');
if (!active) {
$link.parent().find('input.facets-checkbox').prop('checked', false);
}
};
/**
* Disable all facet checkboxes in the facet and apply a 'disabled' class.
*
......@@ -101,4 +125,4 @@
e.preventDefault();
};
})(jQuery, Drupal);
})(jQuery, Drupal, once);
......@@ -3,7 +3,7 @@
* Transforms links into a dropdown list.
*/
(function ($) {
(function ($, once) {
'use strict';
......@@ -24,7 +24,7 @@
*/
Drupal.facets.makeDropdown = function (context, settings) {
// Find all dropdown facet links and turn them into an option.
$('.js-facets-dropdown-links').once('facets-dropdown-transform').each(function () {
$(once('facets-dropdown-transform', '.js-facets-dropdown-links')).each(function () {
var $ul = $(this);
var $links = $ul.find('.facet-item a');
var $dropdown = $('<select></select>');
......@@ -101,4 +101,4 @@
});
};
})(jQuery);
})(jQuery, once);
......@@ -4,7 +4,7 @@
*/
(function ($, Drupal) {
(function ($, Drupal, once) {
'use strict';
/**
......@@ -39,7 +39,7 @@
// Update view on summary block click.
if (updateFacetsSummaryBlock() && (facetId === 'facets_summary_ajax')) {
$('[data-drupal-facets-summary-id=' + facetSettings.facets_summary_id + ']').children('ul').children('li').once().click(function (e) {
$(once(facetId, '[data-drupal-facets-summary-id=' + facetSettings.facets_summary_id + '] ul li')).click(function (e) {
e.preventDefault();
var facetLink = $(this).find('a');
updateFacetsView(facetLink.attr('href'), current_dom_id, view_path);
......@@ -216,4 +216,4 @@
return href.split('?')[0] + '?' + $.param(params);
};
})(jQuery, Drupal);
})(jQuery, Drupal, once);
......@@ -3,7 +3,7 @@
* Facets views Link widgets handling.
*/
(function ($, Drupal) {
(function ($, Drupal, once) {
'use strict';
/**
......@@ -11,8 +11,7 @@
*/
Drupal.behaviors.facetsLinkWidget = {
attach: function (context) {
var $linkFacets = $('.js-facets-links', context)
.once('js-facets-link-on-click');
var $linkFacets = $(once('js-facets-link-on-click', '.js-facets-links', context));
// We are using list wrapper element for Facet JS API.
if ($linkFacets.length > 0) {
......@@ -43,4 +42,4 @@
}
};
})(jQuery, Drupal);
})(jQuery, Drupal, once);
......@@ -3,7 +3,7 @@
* Provides the soft limit functionality.
*/
(function ($) {
(function ($, once) {
'use strict';
......@@ -43,31 +43,31 @@
// Hide facets over the limit.
facetsList.each(function () {
$(this).children('li:gt(' + zero_based_limit + ')').once('applysoftlimit').hide();
$(once('applysoftlimit', $(this).children('li:gt(' + zero_based_limit + ')'))).hide();
});
// Add "Show more" / "Show less" links.
facetsList.once().filter(function () {
$(once('applysoftlimit', facetsList.filter(function () {
return $(this).find('li').length > limit;
}).each(function () {
}))).each(function () {
var facet = $(this);
var showLessLabel = settings.facets.softLimitSettings[facet_id].showLessLabel;
var showMoreLabel = settings.facets.softLimitSettings[facet_id].showMoreLabel;
$('<a href="#" class="facets-soft-limit-link"></a>')
.text(showMoreLabel).attr("aria-expanded", "false")
.text(showMoreLabel)
.on('click', function () {
if (facet.find('li:hidden').length > 0) {
facet.find('li:gt(' + zero_based_limit + ')').slideDown();
facet.find('li:lt(' + (zero_based_limit + 2) + ') input').focus();
$(this).addClass('open').text(showLessLabel).attr("aria-expanded", "true");
facet.find('li:lt(' + (zero_based_limit + 2) + ') a, li:lt(' + (zero_based_limit + 2) + ') input').focus();
$(this).addClass('open').text(showLessLabel);
}
else {
facet.find('li:gt(' + zero_based_limit + ')').slideUp();
$(this).removeClass('open').text(showMoreLabel).attr("aria-expanded", "false");
$(this).removeClass('open').text(showMoreLabel);
}
return false;
}).insertAfter($(this));
});
};
})(jQuery);
})(jQuery, once);
name: 'Facets Range Widget'
type: module
description: 'Provides a range widget and solid slider.'
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9.2 || ^10.0
package: Search
dependencies:
- facets:facets
- jquery_ui_slider:jquery_ui_slider
- jquery_ui_touch_punch:jquery_ui_touch_punch
test_dependencies:
- search_api:search_api
- facets:facets
......
......@@ -16,7 +16,7 @@ function facets_range_widget_requirements() {
// If library is not found, look in the current profile libraries path.
if (!$library_exists) {
$profile = \Drupal::installProfile();
$profile_path = drupal_get_path('profile', $profile);
$profile_path = Drupal::service('extension.list.profile')->getPath($profile);
$profile_path .= $library_path;
$library_exists = file_exists($profile_path);
}
......
......@@ -11,7 +11,7 @@ jquery.ui.slider.pips:
component:
/libraries/jquery-ui-slider-pips/dist/jquery-ui-slider-pips.min.css: { minified: true }
dependencies:
- core/jquery.ui.slider
- jquery_ui_slider/slider
slider:
version: VERSION
......@@ -25,4 +25,4 @@ slider:
- core/drupalSettings
- core/jquery.once
- facets_range_widget/jquery.ui.slider.pips
- core/jquery.ui.touch-punch
- jquery_ui_touch_punch/touch-punch
......@@ -2,6 +2,7 @@
namespace Drupal\Tests\facets_range_widget\Unit\Plugin\processor;
use Drupal\Tests\facets\Unit\Drupal10CompatibilityUnitTestCase;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\Routing\UrlGeneratorInterface;
......@@ -12,7 +13,6 @@ use Drupal\facets\Plugin\facets\url_processor\QueryString;
use Drupal\facets\Result\Result;
use Drupal\facets\Utility\FacetsUrlGenerator;
use Drupal\facets_range_widget\Plugin\facets\processor\RangeSliderProcessor;
use Drupal\Tests\UnitTestCase;
use Prophecy\Argument;
/**
......@@ -21,7 +21,7 @@ use Prophecy\Argument;
* @group facets
* @coversDefaultClass \Drupal\facets_range_widget\Plugin\facets\processor\RangeSliderProcessor
*/
class RangeSliderProcessorTest extends UnitTestCase {
class RangeSliderProcessorTest extends Drupal10CompatibilityUnitTestCase {
/**
* The processor we're testing.
......
......@@ -2,13 +2,13 @@
namespace Drupal\Tests\facets_range_widget\Unit\Plugin\processor;
use Drupal\Tests\facets\Unit\Drupal10CompatibilityUnitTestCase;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\facets\Entity\Facet;
use Drupal\facets\Plugin\facets\widget\ArrayWidget;
use Drupal\facets\Result\Result;
use Drupal\facets\Widget\WidgetPluginManager;
use Drupal\facets_range_widget\Plugin\facets\processor\SliderProcessor;
use Drupal\Tests\UnitTestCase;
/**
* Unit test for processor.
......@@ -16,7 +16,7 @@ use Drupal\Tests\UnitTestCase;
* @group facets
* @coversDefaultClass \Drupal\facets_range_widget\Plugin\facets\processor\SliderProcessor
*/
class SliderProcessorTest extends UnitTestCase {
class SliderProcessorTest extends Drupal10CompatibilityUnitTestCase {
/**
* The processor we're testing.
......
......@@ -23,7 +23,7 @@ class RangeSliderWidgetTest extends SliderWidgetTest {
* {@inheritdoc}
*/
public function testGetQueryType() {
$result = $this->widget->getQueryType($this->queryTypes);
$result = $this->widget->getQueryType();
$this->assertEquals('range', $result);
}
......
......@@ -30,7 +30,7 @@ class SliderWidgetTest extends WidgetTestBase {
* {@inheritdoc}
*/
public function testGetQueryType() {
$result = $this->widget->getQueryType($this->queryTypes);
$result = $this->widget->getQueryType();
$this->assertEquals(NULL, $result);
}
......