You are here

public function FacetSourcePluginManagerTest::testInvalidDefinitions in Facets 8

Tests plugin manager definitions.

@dataProvider invalidDefinitions

File

tests/src/Unit/FacetSource/FacetSourcePluginManagerTest.php, line 113

Class

FacetSourcePluginManagerTest
Unit test for plugin manager.

Namespace

Drupal\Tests\facets\Unit\FacetSource

Code

public function testInvalidDefinitions($invalid_definition) {
  $definitions = [
    'foo' => [
      $invalid_definition,
    ],
  ];
  $this->discovery
    ->expects($this
    ->once())
    ->method('getDefinitions')
    ->willReturn($definitions);
  $this
    ->expectException(PluginException::class);
  $this->sut
    ->getDefinitions();
}