You are here

public function LoggerServiceTest::testSetChannelGrantsException in Purge 8.3

@covers ::setChannel @dataProvider providerTestSetChannelGrantsException()

File

tests/src/Unit/Logger/LoggerServiceTest.php, line 275

Class

LoggerServiceTest
@coversDefaultClass \Drupal\purge\Logger\LoggerService

Namespace

Drupal\Tests\purge\Unit\Logger

Code

public function testSetChannelGrantsException($id, $grants) : void {
  $config_factory = $this
    ->getConfigFactoryStub($this->defaultConfig);
  $service = new LoggerService($config_factory, $this->loggerChannelPartFactory);
  $this
    ->expectException(\LogicException::class);
  $this
    ->expectExceptionMessage('Passed grant is invalid!');
  $service
    ->setChannel($id, $grants);
}