You are here

public function SupportedGroupingFieldsTest::setUp in Search API Grouping 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/SupportedGroupingFieldsTest.php, line 35

Class

SupportedGroupingFieldsTest
Test the getSupportedFields method.

Namespace

Drupal\Tests\search_api_grouping\Unit

Code

public function setUp($processor = NULL) {
  parent::setUp();
  $this->processor = new Grouping([], 'grouping', []);
  $serviceTranslation = new TranslationManager(new LanguageDefault([
    'en',
  ]));
  $container = new ContainerBuilder();
  \Drupal::setContainer($container);
  $container
    ->set('string_translation', $serviceTranslation);
  $this->index = $this
    ->getMockBuilder(IndexInterface::class)
    ->disableOriginalConstructor()
    ->getMock();
}