public function LoggerServiceTest::testSetChannel in Purge 8.3
@covers ::setChannel
@dataProvider providerTestSetChannel()
File
- tests/
src/ Unit/ Logger/ LoggerServiceTest.php, line 229
Class
- LoggerServiceTest
- @coversDefaultClass \Drupal\purge\Logger\LoggerService
Namespace
Drupal\Tests\purge\Unit\LoggerCode
public function testSetChannel($id, $preexists) : void {
$config_factory = $this
->getConfigFactoryStub($this->defaultConfig);
$service = new LoggerService($config_factory, $this->loggerChannelPartFactory);
$this
->assertEquals($preexists, $service
->hasChannel($id));
$this
->assertEquals(NULL, $service
->setChannel($id, [
1,
2,
3,
]));
$this
->assertEquals(TRUE, $service
->hasChannel($id));
}