- Issue created by @murz
- @murz opened merge request.
- Status changed to Fixed
almost 2 years ago 2:03pm 1 February 2023 - Status changed to Fixed
almost 2 years ago 2:04pm 1 February 2023
LoggerChannelFactoryStub->stubGetLogs() fails when no logs are created.
1. Create a logger factory:
$loggerFactory = TestHelpers::service('logger.factory');
2. Don't add any logs and require a logs:
$logs = $loggerFactory->stubGetLogs();
You will get a fatal error:
Error: Typed property Drupal\test_helpers\Logger\StaticLogger::$logs must not be accessed before initialization
Fixed
1.0
Code