You are here

protected function SliderProcessorTest::configureContainer in Facets 8

Configures the container.

Parameters

array $config: The config for the widget.

6 calls to SliderProcessorTest::configureContainer()
SliderProcessorTest::testOutOfRange in modules/facets_range_widget/tests/src/Unit/Plugin/processor/SliderProcessorTest.php
Adds a regression test for the out of range values.
SliderProcessorTest::testPostQuery in modules/facets_range_widget/tests/src/Unit/Plugin/processor/SliderProcessorTest.php
Tests the post query method.
SliderProcessorTest::testPostQueryBigDataSet in modules/facets_range_widget/tests/src/Unit/Plugin/processor/SliderProcessorTest.php
Tests the post query method with a big dataset.
SliderProcessorTest::testPostQueryFixedMinMax in modules/facets_range_widget/tests/src/Unit/Plugin/processor/SliderProcessorTest.php
Tests the post query method with fixed min/max.
SliderProcessorTest::testPostQueryResultSorting in modules/facets_range_widget/tests/src/Unit/Plugin/processor/SliderProcessorTest.php
Tests the post query method result sorting.

... See full list

File

modules/facets_range_widget/tests/src/Unit/Plugin/processor/SliderProcessorTest.php, line 208

Class

SliderProcessorTest
Unit test for processor.

Namespace

Drupal\Tests\facets_range_widget\Unit\Plugin\processor

Code

protected function configureContainer(array $config = []) {
  $widget = $this
    ->prophesize(ArrayWidget::class);
  $widget
    ->getConfiguration()
    ->willReturn($config);
  $pluginManager = $this
    ->prophesize(WidgetPluginManager::class);
  $pluginManager
    ->createInstance('raw', $config)
    ->willReturn($widget
    ->reveal());
  $container = new ContainerBuilder();
  $container
    ->set('plugin.manager.facets.widget', $pluginManager
    ->reveal());
  \Drupal::setContainer($container);
}