You are here

public function LoggerServiceTest::testSetChannelIdException in Purge 8.3

@covers ::setChannel @dataProvider providerTestSetChannelIdException()

File

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

Class

LoggerServiceTest
@coversDefaultClass \Drupal\purge\Logger\LoggerService

Namespace

Drupal\Tests\purge\Unit\Logger

Code

public function testSetChannelIdException($id) : void {
  $config_factory = $this
    ->getConfigFactoryStub($this->defaultConfig);
  $service = new LoggerService($config_factory, $this->loggerChannelPartFactory);
  $this
    ->expectException(\LogicException::class);
  $this
    ->expectExceptionMessage('The given ID is empty or not a string!');
  $service
    ->setChannel($id);
}