You are here

public function LoggerServiceTest::testDeleteChannel in Purge 8.3

@covers ::deleteChannel

@dataProvider providerTestDeleteChannel()

File

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

Class

LoggerServiceTest
@coversDefaultClass \Drupal\purge\Logger\LoggerService

Namespace

Drupal\Tests\purge\Unit\Logger

Code

public function testDeleteChannel($id, $exists) : void {
  $config_factory = $this
    ->getConfigFactoryStub($this->defaultConfig);
  $service = new LoggerService($config_factory, $this->loggerChannelPartFactory);
  $this
    ->assertEquals($exists, $service
    ->hasChannel($id));
  $this
    ->assertEquals(NULL, $service
    ->deleteChannel($id));
  $this
    ->assertEquals(FALSE, $service
    ->hasChannel($id));
}