You are here

public function BufferLoggerTest::setUp in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/BufferLoggerTest.php \Drupal\Tests\tmgmt_smartling\Kernel\BufferLoggerTest::setUp()

Overrides SmartlingTestBase::setUp

File

tests/src/Kernel/BufferLoggerTest.php, line 21

Class

BufferLoggerTest
Test BufferLogger.

Namespace

Drupal\Tests\tmgmt_smartling\Kernel

Code

public function setUp() : void {
  parent::setUp();
  $this->httpClient = $this
    ->getMockBuilder('GuzzleHttp\\Client')
    ->setMethods([
    'request',
  ])
    ->disableOriginalConstructor()
    ->getMock();
  $this->channel = new LoggerChannel('tmgmt_smartling');
  $this->logger = \Drupal::getContainer()
    ->get('logger.smartling');
  $this->channel
    ->addLogger($this->logger);
  $this
    ->setPrivatePropertyValue($this->logger, 'httpClient', $this->httpClient);
}