You are here

protected function FileLogTest::setUp in File Log 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Unit/FileLogTest.php \Drupal\Tests\filelog\Unit\FileLogTest::setUp()

Overrides FileLogTestBase::setUp

File

tests/src/Unit/FileLogTest.php, line 60

Class

FileLogTest
Test the file logger.

Namespace

Drupal\Tests\filelog\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->token = $this
    ->getMockBuilder(Token::class)
    ->disableOriginalConstructor()
    ->getMock();
  $this->token
    ->method('replace')
    ->willReturnCallback([
    static::class,
    'tokenReplace',
  ]);
  $this->time = $this
    ->createMock(TimeInterface::class);
  $this->time
    ->method('getRequestTime')
    ->willReturn($_SERVER['REQUEST_TIME']);
  $this->logMessageParser = new LogMessageParser();
}