public function JsonLogTest::testCannotPrepareLogFileIfThresholdExceeded in JSONlog 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/JsonLogTest.php \Drupal\Tests\jsonlog\Unit\JsonLogTest::testCannotPrepareLogFileIfThresholdExceeded()
- 3.x tests/src/Unit/JsonLogTest.php \Drupal\Tests\jsonlog\Unit\JsonLogTest::testCannotPrepareLogFileIfThresholdExceeded()
test to see if a log file is not prepared when the log-level is too high
File
- tests/
src/ Unit/ JsonLogTest.php, line 101
Class
- JsonLogTest
- Unit tests for JsonLog class
Namespace
Drupal\Tests\jsonlog\UnitCode
public function testCannotPrepareLogFileIfThresholdExceeded() {
$level = self::DEFAULT_THRESHOLD + 1;
$log_entry = $this->jsonLogger
->prepareLog($level, 'test', []);
$this
->assertTrue($log_entry === FALSE, 'Log entry not built');
}