class DrupalConsoleLoggerTest
Tests DrupalConsoleLogger.
Attributes
#[Group('command')]
#[CoversClass(DrupalConsoleLogger::class)]
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\Tests\PhpUnitCompatibilityTrait, \Prophecy\PhpUnit\ProphecyTrait, \Drupal\TestTools\Extension\DeprecationBridge\ExpectDeprecationTrait, \Drupal\Tests\RandomGeneratorTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\Core\Command\DrupalConsoleLoggerTest extends \Drupal\Tests\UnitTestCase
Expanded class hierarchy of DrupalConsoleLoggerTest
File
-
core/
tests/ Drupal/ Tests/ Core/ Command/ DrupalConsoleLoggerTest.php, line 16
Namespace
Drupal\Tests\Core\CommandView 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.