You are here

public function LoggerServiceTest::testGetChannels in Purge 8.3

@covers ::getChannels

File

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

Class

LoggerServiceTest
@coversDefaultClass \Drupal\purge\Logger\LoggerService

Namespace

Drupal\Tests\purge\Unit\Logger

Code

public function testGetChannels() : void {
  $config_factory = $this
    ->getConfigFactoryStub($this->defaultConfig);
  $service = new LoggerService($config_factory, $this->loggerChannelPartFactory);
  $channels_conf = $this->defaultConfig[LoggerService::CONFIG][LoggerService::CKEY];
  $channels = $service
    ->getChannels();
  $this
    ->assertTrue(is_array($channels));
  $this
    ->assertEquals(count($channels), count($channels_conf));
  $this
    ->assertEquals($channels, $channels_conf);
}