class LoggerTest in MongoDB 8.2
Same name in this branch
- 8.2 modules/mongodb_watchdog/tests/src/Unit/LoggerTest.php \Drupal\Tests\mongodb_watchdog\Unit\LoggerTest
- 8.2 modules/mongodb_watchdog/tests/src/Kernel/LoggerTest.php \Drupal\Tests\mongodb_watchdog\Kernel\LoggerTest
Test the ControllerBase mechanisms.
@coversDefaultClass \Drupal\mongodb_watchdog\Logger
@group mongodb
Hierarchy
- class \Drupal\Tests\mongodb_watchdog\Unit\LoggerTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of LoggerTest
File
- modules/
mongodb_watchdog/ tests/ src/ Unit/ LoggerTest.php, line 14
Namespace
Drupal\Tests\mongodb_watchdog\UnitView source
class LoggerTest extends TestCase {
/**
* {@inheritDoc}
*/
public function setUp() : void {
require_once __DIR__ . "/../../modules/mongodb_watchdog_test/mongodb_watchdog_test.module";
}
/**
* Test for issue #3219325 about closures stack.
*
* @link https://www.drupal.org/project/mongodb/issues/3219325
* @covers ::enhanceLogEntry
*
* @throws \ReflectionException
*/
public function testEnhanceLogEntry() {
$backtrace = mongodb_watchdog_test_3219325();
$logger = new MockLogger();
$entry = [];
try {
$logger
->enhanceLogEntry($entry, $backtrace);
} catch (\ReflectionException $e) {
$this
->fail($e
->getMessage());
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LoggerTest:: |
public | function | ||
LoggerTest:: |
public | function | Test for issue #3219325 about closures stack. |