LoggerChannelPartFactoryTest.php in Purge 8.3
File
tests/src/Unit/Logger/LoggerChannelPartFactoryTest.php
View source
<?php
namespace Drupal\Tests\purge\Unit\Logger;
use Drupal\purge\Logger\LoggerChannelPartFactory;
use Drupal\Tests\UnitTestCase;
class LoggerChannelPartFactoryTest extends UnitTestCase {
protected $loggerChannelPartFactory;
protected $loggerChannelPurge;
protected function setUp() : void {
$this->loggerChannelPurge = $this
->createMock('\\Psr\\Log\\LoggerInterface');
$this->loggerChannelPartFactory = new LoggerChannelPartFactory($this->loggerChannelPurge);
}
public function testCreate($id, array $grants = []) : void {
$this
->assertInstanceOf('\\Drupal\\purge\\Logger\\LoggerChannelPart', $this->loggerChannelPartFactory
->create($id, $grants));
}
public function providerTestCreate() : array {
return [
[
'foo',
[
0,
1,
2,
],
],
[
'bar',
[
1,
2,
3,
],
],
[
'baz',
[
2,
3,
4,
],
],
];
}
}