You are here

public function QueryTypePluginManagerTest::testGetDefinitions in Facets 8

Tests plugin manager's getDefinitions method.

File

tests/src/Unit/QueryType/QueryTypePluginManagerTest.php, line 92

Class

QueryTypePluginManagerTest
Unit test for the query type plugin manager.

Namespace

Drupal\Tests\facets\Unit\QueryType

Code

public function testGetDefinitions() {
  $definitions = [
    'foo' => [
      'label' => $this
        ->randomMachineName(),
    ],
  ];
  $this->discovery
    ->expects($this
    ->once())
    ->method('getDefinitions')
    ->willReturn($definitions);
  $this
    ->assertSame($definitions, $this->sut
    ->getDefinitions());
}