function DrupalConsoleLoggerTest::testToPsr3Exception
Tests the exception thrown by ::toPsr3() due to an invalid argument.
File
-
core/
tests/ Drupal/ Tests/ Core/ Command/ DrupalConsoleLoggerTest.php, line 23
Class
- DrupalConsoleLoggerTest
- Tests DrupalConsoleLogger.
Namespace
Drupal\Tests\Core\CommandCode
public function testToPsr3Exception() : void {
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageIs('Invalid log level: -1000');
DrupalConsoleLogger::toPsr3(-1000);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.