class DrupalConsoleLoggerTest

Tests DrupalConsoleLogger.

Attributes

#[Group('command')] #[CoversClass(DrupalConsoleLogger::class)]

Hierarchy

Expanded class hierarchy of DrupalConsoleLoggerTest

File

core/tests/Drupal/Tests/Core/Command/DrupalConsoleLoggerTest.php, line 16

Namespace

Drupal\Tests\Core\Command
View source
class DrupalConsoleLoggerTest extends UnitTestCase {
  
  /**
   * Tests the exception thrown by ::toPsr3() due to an invalid argument.
   */
  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.