public function JsonLogTest::testGetCorrectFilename in JSONlog 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/JsonLogTest.php \Drupal\Tests\jsonlog\Unit\JsonLogTest::testGetCorrectFilename()
- 3.x tests/src/Unit/JsonLogTest.php \Drupal\Tests\jsonlog\Unit\JsonLogTest::testGetCorrectFilename()
test correct filename can be constructed
File
- tests/
src/ Unit/ JsonLogTest.php, line 111
Class
- JsonLogTest
- Unit tests for JsonLog class
Namespace
Drupal\Tests\jsonlog\UnitCode
public function testGetCorrectFilename() {
$time = date(self::DEFAULT_TIME_FORMAT);
$filename = $this->jsonLogger
->getFileName(self::DEFAULT_TIME_FORMAT);
$this
->assertEquals(self::DEFAULT_LOG_DIR . '/' . self::DEFAULT_SITE_ID . '.' . $time . '.json.log', $filename, 'Correct filename constructed.');
}