You are here

public function SearchApiSortsManagerTest::setUp in Search API sorts 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/SearchApiSortsManagerTest.php, line 72

Class

SearchApiSortsManagerTest
Tests the sorts manager.

Namespace

Drupal\Tests\search_api_sorts\Unit

Code

public function setUp() : void {
  parent::setUp();
  $this->moduleHandler = $this
    ->prophesize(ModuleHandlerInterface::class)
    ->reveal();
  $this->display = $this
    ->prophesize(DisplayInterface::class)
    ->reveal();
  $this->requestStack = new RequestStack();

  // Only set up the prophecy for now,
  // it will need to be configured differently for each test function.
  $this->entityTypeManagerProphecy = $this
    ->prophesize(EntityTypeManagerInterface::class);
  $this->request = new Request();
  $this->searchApiDisplayManager = $this
    ->prophesize(DisplayPluginManagerInterface::class)
    ->reveal();
}